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
现在就比如,我想将一些公共的js方法注入到每一个页面,从楼主的代码来看的话,需要在每一个页面中引入,那能不能只引一次js公共方法就能实现所有页面共享呢???
The text was updated successfully, but these errors were encountered:
你可以试一下webpack自带的ProvidePlugin插件。 在每个页面自动引入vue、vue-router、vuex
module.exports = { entry: utils.entries(), output: {...}, plugins: [ new webpack.ProvidePlugin({ Vue: 'vue', Router: 'vue-router', Vuex: 'vuex' }) ], resolve: {...} ...... }
Sorry, something went wrong.
No branches or pull requests
现在就比如,我想将一些公共的js方法注入到每一个页面,从楼主的代码来看的话,需要在每一个页面中引入,那能不能只引一次js公共方法就能实现所有页面共享呢???
The text was updated successfully, but these errors were encountered: