Bot releases are visible (Hide)
This release is not tagged as latest
on npm. You will need to explicitly install it as vue-loader@next
.
Does not work with Vue.js core 1.x, due to the different template compilation requirements.
Babel no longer required as peer depdendency
With this change, npm will no longer complain about missing peer dependencies if you happen to use, say, CoffeeScript or plain ES5 in your vue components and don't actually need Babel.
If babel-loader
doesn't exist as a peer dependency, vue-loader
will not attempt to transpile content inside <script>
tags in Vue components (they are treated as plain ES5). To make vue-loader
ES2015-aware, simply install and configure babel-loader
and other babel related packages as you normally would. vue-loader
will automatically detect their presence and applies babel transformation to Vue components.
Removed CSS autoprefixing
This is not strictly within the scope of vue-loader
, and in most cases you will need to configure it with targeted browsers anyway. Many PostCSS-based frameworks have this included as well. Since vue-loader
already supports using PostCSS plugins, simply install autoprefixer
and pass it to vue-loader
as a PostCSS plugin.
The postcss
option now supports an object format that allows passing additional options to the PostCSS processor instance. This is useful when you are using PostCSS projects that relies on custom parser/stringifiers: (@esiao)
postcss: {
plugins: [...], // list of plugins
options: {
parser: sugarss // use sugarss parser
}
}
vue
in webpack config: template
. Use this option to pass options to the template rendering engine (via consolidate) if you are using a non-html templating language. (@bopjesvla)[email protected]
now that babel plugins are self-hosted on [email protected]
as well.Template validation: vue-loader
will now detect and report common syntax errors in Vue templates at compile time.
Currently there are only 3 rules, but expect more to come in the future.
vue-loader
now can properly handle language blocks that have a base indent - it will de-indent the entire block before passing to through other loaders, so that indent-sensitive pre-processors will no longer complain about it.vue-loader
now has a peer dependency on vue-style-loader
instead of style-loader
. The fork fixes an issue where root-relative urls in CSS files are not loaded properly when CSS source map is enabled.Added dependency injection support for easier mocking in unit tests. Docs
Scripts can now use src imports too:
<script src="./sript.js"></script>
babel-runtime
peer dependency to 5.x due to:
babel-runtime
6.xCustom loader configuration now uses a vue
block in your webpack config:
module.exports = {
// entry, output...
module: {
loaders: [{
test: /\.vue$/, loader: 'vue'
}]
},
vue: {
// configure autoprefixer
autoprefixer: {
browsers: ['last 2 versions']
},
// custom loaders, this replaces the old vue.withLoaders({})
loaders: {
js: 'coffee'
}
},
devtool: '#source-map'
}