in development, only build docs/index
This commit is contained in:
parent
e91c28ad81
commit
7e88e74095
@ -1,6 +1,5 @@
|
|||||||
const pkg = require('../package.json');
|
const pkg = require('../package.json');
|
||||||
const base = require('./base.js');
|
const base = require('./base.js');
|
||||||
const entries = require('./entrypoints');
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
|
||||||
const devServer = {
|
const devServer = {
|
||||||
@ -14,16 +13,14 @@ const devServer = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Object.assign(base.config, {
|
module.exports = Object.assign(base.config, {
|
||||||
entry: entries.reduce((all, entry) => {
|
entry: {
|
||||||
all[entry.name] = [
|
docs: [
|
||||||
'react-hot-loader/patch',
|
'react-hot-loader/patch',
|
||||||
'webpack-dev-server/client?http://localhost:8080',
|
'webpack-dev-server/client?http://localhost:8080',
|
||||||
'webpack/hot/only-dev-server',
|
'webpack/hot/only-dev-server',
|
||||||
entry.path
|
'./docs/index.js'
|
||||||
];
|
]
|
||||||
|
},
|
||||||
return all;
|
|
||||||
}, {}),
|
|
||||||
plugins: base.config.plugins.concat([
|
plugins: base.config.plugins.concat([
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
|
Loading…
Reference in New Issue
Block a user