You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
48 lines
1.0 KiB
'use strict' |
|
|
|
const path = require('path') |
|
const webpack = require('webpack') |
|
|
|
module.exports = { |
|
entry: ['./docs/index.js'], |
|
output: { |
|
path: path.join(__dirname, 'docs/build'), |
|
filename: 'bundle.js', |
|
publicPath: '/build/', |
|
}, |
|
module: { |
|
loaders: [{ |
|
test: /\.jsx?$/, |
|
loader: 'babel', |
|
exclude: /node_modules/, |
|
query: { |
|
cacheDirectory: true, |
|
presets: ['react', 'es2015', 'stage-0'], |
|
}, |
|
}, { |
|
test: /\.css$/, |
|
loaders: ['style-loader', 'css-loader'], |
|
}, { |
|
test: /\.md$/, |
|
loaders: ['html-loader'], |
|
}, |
|
], |
|
}, |
|
resolve: { |
|
alias: { |
|
'reactcss': path.resolve(__dirname, './lib/index.js'), |
|
}, |
|
extensions: ['', '.js', '.jsx', '.cjsx'], |
|
fallback: [path.resolve(__dirname, './modules')], |
|
}, |
|
plugins: [ |
|
new webpack.DefinePlugin({ |
|
'process.env': { |
|
NODE_ENV: JSON.stringify('production'), |
|
}, |
|
}), |
|
new webpack.optimize.DedupePlugin(), |
|
], |
|
devtool: 'eval', |
|
quiet: true, |
|
}
|
|
|