|
|
@@ -1,18 +1,29 @@
|
|
|
+var path = require('path')
|
|
|
var webpack = require('webpack')
|
|
|
|
|
|
module.exports = {
|
|
|
entry: './test/unit/specs/index.js',
|
|
|
output: {
|
|
|
- path: './test/unit',
|
|
|
+ path: path.resolve(__dirname, '../test/unit'),
|
|
|
filename: 'specs.js'
|
|
|
},
|
|
|
+ resolve: {
|
|
|
+ alias: {
|
|
|
+ src: path.resolve(__dirname, '../src')
|
|
|
+ }
|
|
|
+ },
|
|
|
module: {
|
|
|
loaders: [
|
|
|
- { test: /\.js$/, loader: 'babel', exclude: /test\/unit/ }
|
|
|
+ {
|
|
|
+ test: /\.js$/,
|
|
|
+ loader: 'babel',
|
|
|
+ exclude: /test\/unit|node_modules/
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
babel: {
|
|
|
- loose: 'all'
|
|
|
+ loose: 'all',
|
|
|
+ optional: ['runtime']
|
|
|
},
|
|
|
plugins: [
|
|
|
new webpack.DefinePlugin({
|
|
|
@@ -22,7 +33,8 @@ module.exports = {
|
|
|
})
|
|
|
],
|
|
|
devServer: {
|
|
|
- contentBase: './test/unit'
|
|
|
+ contentBase: './test/unit',
|
|
|
+ noInfo: true
|
|
|
},
|
|
|
devtool: '#source-map'
|
|
|
}
|