mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
25 lines
730 B
JavaScript
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
|
|
}
|