Upgrade vue-loader to webpack 3
See original GitHub issueWhat problem does this feature solve?
With the recent launch of webpack 3, some exciting features was added, including Scope Hoisting. As stated by the team:
“Migrating from webpack 2 to 3, should involve no effort beyond running the upgrade commands in your terminal. We marked this as a Major change because of internal breaking changes that could affect some plugins.”
So, I believe the migration will be easy and will give only benefits:
npm install webpack@3.0.0 --save-dev
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Migrating from v14 - Vue Loader
We are in the process of upgrading Vue CLI 3 beta to use webpack 4 + Vue Loader v15, so you might want...
Read more >vue-loader - npm
vue -loader is a loader for webpack that allows you to author Vue components in a format called Single-File Components (SFCs):.
Read more >Vuejs 3 webpack : Problem with vue-template-compiler
To make vue 3 work fine with webpack without using vite or vue cli follow these steps : init the package.json like :....
Read more >06 April 2020 - Webpack for Vue 3 - Lachlan Miller
In this article we build a webpack configuration from scratch for developing Vue.js 3 apps. Specifically, we will support .vue files, ...
Read more >How to setup a vue project with webpack. - DEV Community
Configure webpack to use babel loader, and vue loader ... Run npm install vue vue-router core-js --save this would install the three ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tried this today, vue loader works just fine with webpack 3, but when
new webpack.optimize.ModuleConcatenationPlugin()
is enabled, it prevents webpack from concatenating the modules. Because vue-loader by default convertsexport
statements in vue files tomodule.exports
andModuleConcatenationPlugin
bailsout on these statements.If you enable
--display-optimization-bailout
option during build, it clearly saysmodule is used with non-harmony imports from ./src/App.vue
more details:
I’ve tried setting
esModule
to true in vue loader config. but that also didn’t work.@erickpetru I’m not sure what you are asking - here should we update webpack? In this repository?
Or are you simply asking if vue-loader works with webpack 3?
The latter is: yes, but we are currently working on implementing true esmodule exports to reap the benefits of the ModuleConcatenationPlugin - which currently bails on
.vue
files as @serkanyersen correctly observed.