Fix babel options for .vue files

This commit is contained in:
Sébastien Chopin 2016-12-13 17:37:53 +01:00
parent d3b904cb7c
commit c16c7b71bd

View File

@ -1,10 +1,16 @@
'use strict'
module.exports = function () {
let babelOptions = JSON.stringify({
presets: [
['es2015', { modules: false }],
'stage-2'
]
})
let config = {
postcss: this.options.build.postcss,
loaders: {
'js': 'babel-loader?presets[]=es2015&presets[]=stage-2',
'js': 'babel-loader?' + babelOptions,
'less': 'vue-style-loader!css-loader!less-loader',
'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
'scss': 'vue-style-loader!css-loader!sass-loader',