mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
Fix babel options for .vue files
This commit is contained in:
parent
d3b904cb7c
commit
c16c7b71bd
@ -1,10 +1,16 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
|
let babelOptions = JSON.stringify({
|
||||||
|
presets: [
|
||||||
|
['es2015', { modules: false }],
|
||||||
|
'stage-2'
|
||||||
|
]
|
||||||
|
})
|
||||||
let config = {
|
let config = {
|
||||||
postcss: this.options.build.postcss,
|
postcss: this.options.build.postcss,
|
||||||
loaders: {
|
loaders: {
|
||||||
'js': 'babel-loader?presets[]=es2015&presets[]=stage-2',
|
'js': 'babel-loader?' + babelOptions,
|
||||||
'less': 'vue-style-loader!css-loader!less-loader',
|
'less': 'vue-style-loader!css-loader!less-loader',
|
||||||
'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
|
'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
|
||||||
'scss': 'vue-style-loader!css-loader!sass-loader',
|
'scss': 'vue-style-loader!css-loader!sass-loader',
|
||||||
|
Loading…
Reference in New Issue
Block a user