sphinx_rtd_theme/webpack.dev.js

35 lines
888 B
JavaScript
Raw Normal View History

2019-07-02 05:17:20 -05:00
const path = require('path');
const merge = require('webpack-merge');
const exec = require('child_process').exec;
const WatchPlugin = require('webpack-watch-files-plugin').default;
const ShellPlugin = require('webpack-shell-plugin');
const common = require('./webpack.common.js');
2019-07-02 05:17:20 -05:00
module.exports = merge(common, {
mode: 'development',
watch: true,
devServer: {
contentBase: path.join(__dirname, 'docs/build/html'),
watchContentBase: true,
2019-07-02 05:17:20 -05:00
compress: false,
2019-07-18 17:51:27 -05:00
port: 1919,
hot: false,
liveReload: true,
publicPath: '/_static/'
},
plugins: [
new WatchPlugin({
files: [
'./docs/**/*.rst',
'./docs/**/*.py',
]
}),
new ShellPlugin({
2019-07-18 17:51:27 -05:00
onBuildEnd: ['make -C docs clean html'],
// dev=false here to force every build to trigger make, the default is
// first build only.
dev: false,
}),
]
});