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.
45 lines
1.1 KiB
45 lines
1.1 KiB
'use strict' |
|
|
|
const path = require('path') |
|
const webpack = require('webpack') |
|
|
|
module.exports = { |
|
entry: ['webpack-dev-server/client?http://localhost:2570', 'webpack/hot/dev-server', './docs/index.js'], |
|
output: { |
|
path: './docs/build', |
|
filename: 'bundle.js', |
|
publicPath: 'http://localhost:2570/docs/build/', |
|
}, |
|
module: { |
|
loaders: [ |
|
{ |
|
exclude: /node_modules/, |
|
test: /\.js$/, |
|
loaders: ['react-hot-loader', 'babel?presets[]=react'], |
|
}, { |
|
test: /\.jsx$/, |
|
exclude: /node_modules/, |
|
loaders: ['react-hot-loader', 'babel'], |
|
}, { |
|
test: /\.css$/, |
|
loaders: ['style-loader', 'css-loader'], |
|
}, { |
|
test: /\.md$/, |
|
loaders: ['html-loader'], |
|
}, |
|
], |
|
}, |
|
resolve: { |
|
alias: { |
|
'reactcss': path.resolve(__dirname, './src/index.js'), |
|
}, |
|
extensions: ['', '.js', '.jsx', '.cjsx'], |
|
fallback: [path.resolve(__dirname, './modules')], |
|
}, |
|
plugins: [ |
|
new webpack.HotModuleReplacementPlugin({ quiet: true }), |
|
new webpack.NoErrorsPlugin(), |
|
], |
|
devtool: 'eval', |
|
quiet: true, |
|
}
|
|
|