github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/public/libs/vue-1.0.24/build/webpack.test.config.js (about) 1 var path = require('path') 2 var webpack = require('webpack') 3 4 module.exports = { 5 entry: './test/unit/specs/index.js', 6 output: { 7 path: path.resolve(__dirname, '../test/unit'), 8 filename: 'specs.js' 9 }, 10 resolve: { 11 alias: { 12 src: path.resolve(__dirname, '../src') 13 } 14 }, 15 module: { 16 loaders: [ 17 { 18 test: /\.js$/, 19 loader: 'babel', 20 // NOTE: use absolute path to make sure 21 // running tests is OK even if it is in node_modules of other project 22 exclude: [ 23 path.resolve(__dirname, '../test/unit'), 24 path.resolve(__dirname, '../node_modules') 25 ] 26 } 27 ] 28 }, 29 babel: { 30 loose: 'all', 31 optional: ['runtime'] 32 }, 33 plugins: [ 34 new webpack.DefinePlugin({ 35 'process.env': { 36 NODE_ENV: '"development"' 37 } 38 }) 39 ], 40 devServer: { 41 contentBase: './test/unit', 42 noInfo: true 43 }, 44 devtool: 'source-map' 45 }