Skip to content

Commit

Permalink
Update Parcel to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
RileyAbr committed Oct 28, 2024
1 parent 5317c25 commit 3130a9b
Show file tree
Hide file tree
Showing 9 changed files with 12,914 additions and 10,504 deletions.
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,
// })

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

0 comments on commit 3130a9b

Please sign in to comment.