Open Jarryxin opened 2 years ago
reproducing repo: https://github.com/Jarryxin/vue-spa-app
@Jarryxin I was dealing with the same error after upgrading to v5 of the Vue CLI. Since it apparently uses Webpack 5, I don't think the SystemJSPublicPathWebpackPlugin is needed.
The following seemed to solve the error for me:
// vue.config.js
module.exports = {
configureWebpack: {
output: {
libraryTarget: "system",
},
},
chainWebpack: (config) => {
if (config.plugins.has("SystemJSPublicPathWebpackPlugin")) {
config.plugins.delete("SystemJSPublicPathWebpackPlugin");
}
},
filenameHashing: false,
};
@Jarryxin I was dealing with the same error after upgrading to v5 of the Vue CLI. Since it apparently uses Webpack 5, I don't think the SystemJSPublicPathWebpackPlugin is needed.
The following seemed to solve the error for me:
// vue.config.js module.exports = { configureWebpack: { output: { libraryTarget: "system", }, }, chainWebpack: (config) => { if (config.plugins.has("SystemJSPublicPathWebpackPlugin")) { config.plugins.delete("SystemJSPublicPathWebpackPlugin"); } }, filenameHashing: false, };
thank you!!! delete SystemJSPublicPathWebpackPlugin, it works. love you!!
after upgrade vue webpack5... error occurred.
(set libraryTarget = umd) https://github.com/single-spa/vue-cli-plugin-single-spa/blob/main/index.js#L26
invoked SystemJSPublicPathWebpackPlugin (https://github.com/single-spa/vue-cli-plugin-single-spa/blob/main/index.js#L33)
inner invoked
https://github.com/joeldenning/systemjs-webpack-interop/blob/main/auto-public-path/auto-public-path.js#L15
此处
__system_context__
是undefined
,报错Currently, I change
vue.config.js
, fllow: