v9.3.0
Pre-release
Pre-release
Breaking Change
Note: breaking change in a minor release because the 9.x line is considered pre-releases until Vue 2.0 is officially out.
-
Named exports support has been reverted. The module export behavior is now the same with vue-loader 8.x: ES2015 default export will be normalized into
module.exports
. This means the following are equivalent:import App from './App.vue' const App = require('./App.vue') // no .default required
The main reasoning behind this behavior though, is because named exports are rarely used in
*.vue
files (they can always be extracted into a separate*.js
file instead), but the normalizing behavior can make async Vue components easier to write. Consider:// 8.x & ^9.3 behavior const Foo = resolve => require(['./Foo.vue'], resolve)
vs. without normalizing:
// 9.1 & 9.2 behavior const Foo = resolve => require(['./Foo.vue'], m => resolve(m.default))
Sorry if this caused confusion if you are currently using 9.2 with async components.