Skip to content

ScriptExternalLoadError: Loading script failed #1273

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

Closed
viviScript opened this issue Dec 9, 2021 · 3 comments
Closed

ScriptExternalLoadError: Loading script failed #1273

viviScript opened this issue Dec 9, 2021 · 3 comments

Comments

@viviScript
Copy link

project vue_components
module.exports = {
name: "vue_components",
filename: 'remoteEntry.js',
library: { type: 'var', name: 'vue_components' },
exposes: {
'./Demo': './src/components/demo.vue'
},
remotes: {
},
shared: ['vue/dist/vue.esm.js'],
}

project jcj_front
module.exports = {
name: "jcj_front",
filename: 'jcj_front.js',
exposes: {
},
remotes: {
'vue_components': 'vue_components@http://localhost:8080/remoteEntry.js',
},
shared: ['vue/dist/vue.esm.js'],
}

App.vue



export default {
name: 'App',
components: {
Demo: () => import('vue_components/Demo')
}
}

image

@viviScript
Copy link
Author

``
module.exports = {
entry: './src/index.js',
output: {
filename: 'static/js/[name].[contenthash:8].js',
path: path.resolve(__dirname, 'dist'),
publicPath: 'auto',
// 支持 es5 输出
// ecmaVersion: 5,
// output.ecmaVersion is replaced with output.environment which lists features used by webpack
environment: {
arrowFunction: false,
bigIntLiteral: false,
const: false,
destructuring: false,
forOf: false,
dynamicImport: false,
module: false,
},
},
}

@viviScript
Copy link
Author

In the project made according to the examples on the official website, this kind of problem appears now. How can I solve it

@ScriptedAlchemy
Copy link
Member

Be sure the remote actually exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants