Switch to webpack
Webapck actually supports loading input source maps and generally seems a lot more solid then browserify (even if their website has an annoying animated logo).
This commit is contained in:
parent
bfa4cda2c6
commit
f020f4397c
4 changed files with 40 additions and 10 deletions
25
webpack.config.js
Normal file
25
webpack.config.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
preLoaders: [
|
||||
{ test: /\.js$/, loader: "source-map-loader" }
|
||||
],
|
||||
loaders: [
|
||||
{ test: /\.json$/, loader: "json" },
|
||||
{ test: /\.js$/, loader: "babel", include: path.resolve('./src') },
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
// alias any requires to the react module to the one in our path, otherwise
|
||||
// we tend to get the react source included twice when using npm link.
|
||||
react: path.resolve('./node_modules/react'),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new webpack.IgnorePlugin(/^olm/)
|
||||
],
|
||||
devtool: 'source-map'
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue