Add experimental Webpack support. Works fine when no cache is involved, but I need to figure out a better story for cache integration as most builds that teams use likely include a cache enabled.
This commit is contained in:
parent
f2040233d0
commit
3801044178
18 changed files with 40032 additions and 486 deletions
37
webpack.config.js
Normal file
37
webpack.config.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
var IconPacker = require('react-iconpack')('webpack'),
|
||||
path = require('path'),
|
||||
PATHS = {
|
||||
src: path.join(__dirname + '/webpack-test/src'),
|
||||
dist: path.join(__dirname + '/webpack-test/dist'),
|
||||
};
|
||||
|
||||
|
||||
module.exports = {
|
||||
cache: true,
|
||||
entry: [path.join(PATHS.src, '/app.js')],
|
||||
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.jsx']
|
||||
},
|
||||
|
||||
output: {
|
||||
path: PATHS.dist,
|
||||
filename: 'build.js'
|
||||
},
|
||||
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel',
|
||||
exclude: /node_modules/,
|
||||
include: PATHS.src,
|
||||
query: {
|
||||
//cacheDirectory: true,
|
||||
presets: ['es2015', 'react'],
|
||||
plugins: ['react-iconpack']
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
plugins: [IconPacker({})]
|
||||
};
|
||||
Reference in a new issue