We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.0.0-alpha.0
https://github.com/fangbinwei/vue-cli-issue-webpack5-bundle
Environment Info: System: OS: Windows 10 10.0.17763 CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz Binaries: Node: 14.15.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - D:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.9 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 87.0.4280.66 Edge: Spartan (44.17763.831.0) npmPackages: @vue/babel-helper-vue-jsx-merge-props: 1.2.1 @vue/babel-helper-vue-transform-on: 1.0.0 @vue/babel-plugin-jsx: 1.0.0 @vue/babel-plugin-transform-vue-jsx: 1.2.1 @vue/babel-preset-app: 5.0.0-alpha.0 @vue/babel-preset-jsx: 1.2.4 @vue/babel-sugar-composition-api-inject-h: 1.2.1 @vue/babel-sugar-composition-api-render-instance: 1.2.4 @vue/babel-sugar-functional-vue: 1.2.2 @vue/babel-sugar-inject-h: 1.2.2 @vue/babel-sugar-v-model: 1.2.3 @vue/babel-sugar-v-on: 1.2.3 @vue/cli-overlay: 5.0.0-alpha.0 @vue/cli-plugin-babel: ~5.0.0-alpha.0 => 5.0.0-alpha.0 @vue/cli-plugin-router: 5.0.0-alpha.0 @vue/cli-plugin-vuex: 5.0.0-alpha.0 @vue/cli-service: ~5.0.0-alpha.0 => 5.0.0-alpha.0 @vue/cli-shared-utils: 5.0.0-alpha.0 @vue/component-compiler-utils: 3.2.0 @vue/preload-webpack-plugin: 1.1.2 @vue/web-component-wrapper: 1.2.0 vue: ^2.6.11 => 2.6.12 vue-hot-reload-api: 2.3.4 vue-loader: 16.1.2 (15.9.6) vue-style-loader: 4.1.2 vue-template-compiler: ^2.6.11 => 2.6.12 vue-template-es2015-compiler: 1.9.1 npmGlobalPackages: @vue/cli: Not Found
build CommonJS lib using --target lib --formats commonjs
--target lib --formats commonjs
npm run build:lib node test_dist.js
the output of webpack4
module.exports = //...
the output of webpack5
module.exports["my-libname"] = //...
Consistent behavior
The behavior of output.library is different from webpack@4 when setting output.libraryTarget: 'commonjs2'
output.library
webpack@4
output.libraryTarget: 'commonjs2'
maybe we should omit the output.library when libraryTarget: 'commonjs2' to make the behavior consistent
libraryTarget: 'commonjs2'
related issue: webpack/webpack#11800,
The text was updated successfully, but these errors were encountered:
fix: "commonjs2" target should not be used with "output.library"
3a3bfba
Closes vuejs#6188
fix: "commonjs2" target should not be used with "output.library" (#6218)
45aca81
Closes #6188
Successfully merging a pull request may close this issue.
Version
5.0.0-alpha.0
Reproduction link
https://github.com/fangbinwei/vue-cli-issue-webpack5-bundle
Environment info
Steps to reproduce
build CommonJS lib using
--target lib --formats commonjs
the output of webpack4
the output of webpack5
What is expected?
Consistent behavior
What is actually happening?
The behavior of
output.library
is different fromwebpack@4
when settingoutput.libraryTarget: 'commonjs2'
maybe we should omit the
output.library
whenlibraryTarget: 'commonjs2'
to make the behavior consistentrelated issue: webpack/webpack#11800,
The text was updated successfully, but these errors were encountered: