1
0
Fork 0
docsearch/webpack.dev.config.babel.js
vvo 4dcda4832b chore(build): allow npm link and inject NODE_ENV
injecting NODE_ENV can reduce the build given libraries
2015-12-16 12:04:01 +01:00

30 lines
689 B
JavaScript

import {join} from 'path';
export default {
entry: './dev/app.js',
devtool: 'source-map',
output: {
path: './dev/',
filename: 'bundle.js'
},
module: {
loaders: [{
test: /\.js$/, exclude: /node_modules/, loader: 'babel'
}]
},
devServer: {
contentBase: 'dev/',
host: '0.0.0.0',
compress: true
},
// when module not found, find locally first
// helps fixing the npm link not working with webpack
// http://stackoverflow.com/a/33722844/147079
resolve: {
fallback: [join(__dirname, '..', 'node_modules')]
},
// same issue, for loaders like babel
resolveLoader: {
fallback: [join(__dirname, '..', 'node_modules')]
},
};