parent
5badc930c9
commit
20b2675471
|
@ -16,11 +16,11 @@ var webpackConfig = merge(baseConfig, {
|
|||
loaders: utils.styleLoaders()
|
||||
},
|
||||
devtool: '#inline-source-map',
|
||||
vue: {
|
||||
loaders: {
|
||||
js: 'isparta'
|
||||
}
|
||||
},
|
||||
// vue: {
|
||||
// loaders: {
|
||||
// js: 'isparta'
|
||||
// }
|
||||
// },
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': require('../../config/test.env')
|
||||
|
@ -32,20 +32,20 @@ var webpackConfig = merge(baseConfig, {
|
|||
delete webpackConfig.entry
|
||||
|
||||
// make sure isparta loader is applied before eslint
|
||||
webpackConfig.module.preLoaders = webpackConfig.module.preLoaders || []
|
||||
webpackConfig.module.preLoaders.unshift({
|
||||
test: /\.js$/,
|
||||
loader: 'isparta',
|
||||
include: path.resolve(projectRoot, 'src')
|
||||
})
|
||||
// webpackConfig.module.preLoaders = webpackConfig.module.preLoaders || []
|
||||
// webpackConfig.module.preLoaders.unshift({
|
||||
// test: /\.js$/,
|
||||
// loader: 'isparta',
|
||||
// include: path.resolve(projectRoot, 'src')
|
||||
// })
|
||||
|
||||
// only apply babel for test files when using isparta
|
||||
webpackConfig.module.loaders.some(function (loader, i) {
|
||||
if (loader.loader === 'babel') {
|
||||
loader.include = path.resolve(projectRoot, 'test/unit')
|
||||
return true
|
||||
}
|
||||
})
|
||||
// // only apply babel for test files when using isparta
|
||||
// webpackConfig.module.loaders.some(function (loader, i) {
|
||||
// if (loader.loader === 'babel') {
|
||||
// loader.include = path.resolve(projectRoot, 'test/unit')
|
||||
// return true
|
||||
// }
|
||||
// })
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
|
|
Loading…
Reference in New Issue