Nuxt/lib/webpack/vue-loader.config.js
2017-03-22 15:47:34 +01:00

25 lines
730 B
JavaScript

'use strict'
import { defaults } from 'lodash'
export default function ({ isClient }) {
let babelOptions = JSON.stringify(defaults(this.options.build.babel, {
presets: ['vue-app'],
cacheDirectory: !!this.dev
}))
let config = {
postcss: this.options.build.postcss,
loaders: {
'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',
'stylus': 'vue-style-loader!css-loader!stylus-loader',
'styl': 'vue-style-loader!css-loader!stylus-loader'
},
preserveWhitespace: false
}
// Return the config
return config
}