vue2/build/webpack.test.config.js

46 lines
931 B
JavaScript
Raw Permalink Normal View History

var path = require('path')
2015-11-19 04:01:05 +08:00
var webpack = require('webpack')
2015-05-11 01:19:55 +08:00
module.exports = {
2015-11-19 04:01:05 +08:00
entry: './test/unit/specs/index.js',
2015-05-11 01:19:55 +08:00
output: {
path: path.resolve(__dirname, '../test/unit'),
2015-05-11 01:19:55 +08:00
filename: 'specs.js'
},
resolve: {
alias: {
src: path.resolve(__dirname, '../src')
}
},
2015-11-19 04:01:05 +08:00
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
// NOTE: use absolute path to make sure
// running tests is OK even if it is in node_modules of other project
exclude: [
path.resolve(__dirname, '../test/unit'),
path.resolve(__dirname, '../node_modules')
]
}
2015-11-19 04:01:05 +08:00
]
},
babel: {
loose: 'all',
optional: ['runtime']
2015-11-19 04:01:05 +08:00
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"'
}
})
],
devServer: {
contentBase: './test/unit',
noInfo: true
2015-11-19 04:01:05 +08:00
},
2016-03-01 02:05:44 +08:00
devtool: 'source-map'
2015-07-02 20:59:11 +08:00
}