mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-09 14:22:27 +02:00
refactor: dev
This commit is contained in:
parent
d9a86a54c1
commit
9070fb50ab
2 changed files with 117 additions and 119 deletions
|
@ -41,12 +41,11 @@ module.exports = async function dev(sourceDir, cliOptions = {}) {
|
||||||
fsWatcher.on('addDir', reload);
|
fsWatcher.on('addDir', reload);
|
||||||
fsWatcher.on('unlinkDir', reload);
|
fsWatcher.on('unlinkDir', reload);
|
||||||
|
|
||||||
// resolve webpack config
|
|
||||||
let config = createDevConfig(props);
|
|
||||||
|
|
||||||
const port = await getPort(cliOptions.port);
|
const port = await getPort(cliOptions.port);
|
||||||
const {publicPath} = props;
|
const {publicPath} = props;
|
||||||
|
|
||||||
|
// resolve webpack config
|
||||||
|
let config = createDevConfig(props);
|
||||||
config.plugin('WebpackNiceLog').use(webpackNiceLog, [
|
config.plugin('WebpackNiceLog').use(webpackNiceLog, [
|
||||||
{
|
{
|
||||||
onDone: () => {
|
onDone: () => {
|
||||||
|
@ -58,7 +57,6 @@ module.exports = async function dev(sourceDir, cliOptions = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
config.plugin('html-webpack-plugin').use(HtmlWebpackPlugin, [
|
config.plugin('html-webpack-plugin').use(HtmlWebpackPlugin, [
|
||||||
{
|
{
|
||||||
inject: false,
|
inject: false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue