Skip to content
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

vue-loader versions available: 13.0.0 #2174

Closed
dependencies bot opened this issue Oct 29, 2017 · 0 comments
Closed

vue-loader versions available: 13.0.0 #2174

dependencies bot opened this issue Oct 29, 2017 · 0 comments
Assignees
Labels
maintenance User-facing maintenance tasks

Comments

@dependencies
Copy link

dependencies bot commented Oct 29, 2017

There are new versions of vue-loader available from npm.

13.0.0

New

  • Now uses ES modules internally to take advantage of webpack 3 scope hoisting. This should result in smaller bundle sizes.

  • Now uses PostCSS@6.

Breaking Changes

  • The esModule option is now true by default, because this is necessary for ES-module-based scope hoisting to work. This means the export from a *.vue file is now an ES module by default, so async components via dynamic import like this will break:

    const Foo = () => import('./Foo.vue')

    Note: the above can continue to work with Vue 2.4 + vue-router 2.7, which will automatically resolve ES modules' default exports when dealing with async components. In earlier versions of Vue and vue-router you will have to do this:

    const Foo = () => import('./Foo.vue').then(m => m.default)

    Alternatively, you can turn off the new behavior by explicitly using esModule: false in vue-loader options.


    Similarly, old CommonJS-style requires will also need to be updated:

    // before
    const Foo = require('./Foo.vue')
    
    // after
    const Foo = require('./Foo.vue').default
  • PostCSS 6 might break old PostCSS plugins that haven't been updated to work with it yet.

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

No branches or pull requests

1 participant