Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade wally.run to Parcel V2 #191

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions wally-registry-frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"presets": ["@babel/env", "@babel/react", "@babel/preset-typescript"],
"plugins": [
"babel-plugin-styled-components",
"@babel/plugin-proposal-dynamic-import",
"@babel/plugin-transform-modules-commonjs"
],
"presets": [
["@babel/preset-env", {
"targets": {
"node": "14.15"
}
}],
"@babel/preset-react"
"@babel/plugin-transform-modules-commonjs",
"@babel/proposal-object-rest-spread"
]
}
2 changes: 2 additions & 0 deletions wally-registry-frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

# Stuff used by the generator tool
/.cache
/.parcel-cache


# npm modules
/node_modules
Expand Down
24 changes: 17 additions & 7 deletions wally-registry-frontend/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,30 @@
// This script bundles the static site generator using Parcel, which in turn
// will invoke Parcel again itself, reusing the same assets.

const Parcel = require("parcel-bundler")
const { Parcel } = require("@parcel/core")

process.env.NODE_ENV = "production"

const publicUrl = process.env.PARCEL_PUBLIC_URL || "/"

console.log("Bundling client with Parcel...")

const bundler = new Parcel(["src/index.html"], {
outDir: "build/static",
publicUrl: "/static",
watch: false,
autoInstall: false,
const bundler = new Parcel({
entries: ["src/index.html"],
defaultConfig: "@parcel/config-default",
defaultTargetOptions: {
distDir: "build/static",
publicUrl: "/static",
},
logLevel: 2,
})

bundler.bundle().then(() => {})
// ,["src/index.html"], {
// outDir: "build/static",
// publicUrl: "/static",
// watch: false,
// autoInstall: false,
// logLevel: 2,
// })
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved

bundler.run().then(() => {})
Loading
Loading