-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support Webpack5 #417
Comments
fossamagna
added a commit
that referenced
this issue
Feb 27, 2021
Change of use some webpack hooks api. - Use chunkAsset hook instead of deprecated optimizeChunkAssets hook. - Use buildModule hook instead of parser.hook. Closes #417 Breaks support only webpack 5.
Merged
@labnol Example webpack.config.js for project using module.exports = {
mode: 'production',
entry: "./main.js",
output: {
path: __dirname + "/output",
filename: "bundle.js",
environment: {
// The environment supports arrow functions ('() => { ... }').
arrowFunction: false,
// The environment supports BigInt as literal (123n).
bigIntLiteral: false,
// The environment supports const and let for variable declarations.
const: false,
// The environment supports destructuring ('{ a, b } = obj').
destructuring: false,
// The environment supports an async import() function to import EcmaScript modules.
dynamicImport: false,
// The environment supports 'for of' iteration ('for (const x of array) { ... }').
forOf: false,
// The environment supports ECMAScript Module syntax to import ECMAScript modules (import ... from '...').
module: false,
}
},
plugins: [
new GasPlugin({ autoGlobalExportsFiles: ["./main.js"] })
],
optimization: {
minimize: true,
}
}; Please see for detail https://webpack.js.org/configuration/output/#outputenvironment. |
Thank you. You are a star! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: