mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
chore: nits
This commit is contained in:
parent
e13e1bffb4
commit
1f2c8a39a9
4 changed files with 7 additions and 8 deletions
|
@ -6,21 +6,20 @@ const createBaseConfig = require('./base');
|
|||
|
||||
module.exports = function createClientConfig(props) {
|
||||
const config = createBaseConfig(props);
|
||||
|
||||
config.entry('main').add(path.resolve(__dirname, '../core/clientEntry.js'));
|
||||
|
||||
// remove/clean build folders before building bundles
|
||||
const {outDir} = props;
|
||||
config
|
||||
.plugin('clean')
|
||||
.use(cleanWebpackPlugin, [outDir, {verbose: false, allowExternal: true}]);
|
||||
|
||||
// write webpack stats object to a file so we can
|
||||
// programmatically refer to the correct bundle path in Node.js server.
|
||||
// write webpack stats object so we can pickup correct client bundle path in server.
|
||||
config
|
||||
.plugin('stats')
|
||||
.use(StatsWriterPlugin, [{filename: 'client.stats.json'}]);
|
||||
|
||||
// show compilation progress bar and build time
|
||||
config.plugin('niceLog').use(webpackNiceLog, [{name: 'Client'}]);
|
||||
|
||||
return config;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue