mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 18:46:57 +02:00
chore: prettier & eslint
This commit is contained in:
parent
56dfec19ea
commit
e8e1d5e097
7 changed files with 55 additions and 45 deletions
17
lib/dev.js
17
lib/dev.js
|
@ -12,7 +12,7 @@ const serveStatic = require('koa-static');
|
|||
const history = require('connect-history-api-fallback');
|
||||
const load = require('./loader');
|
||||
const createDevConfig = require('./webpack/dev');
|
||||
const logPlugin = require('./webpack/plugin/log')
|
||||
const logPlugin = require('./webpack/log');
|
||||
|
||||
module.exports = async function dev(sourceDir, cliOptions = {}) {
|
||||
const logger = ora(chalk.blue('Start development server')).start();
|
||||
|
@ -40,13 +40,14 @@ module.exports = async function dev(sourceDir, cliOptions = {}) {
|
|||
let config = createDevConfig(props);
|
||||
|
||||
const port = cliOptions.port || 8080;
|
||||
const {publicPath} = props;
|
||||
|
||||
config
|
||||
.plugin('blogi-log')
|
||||
.use(logPlugin, [{
|
||||
port,
|
||||
publicPath: props.publicPath
|
||||
}]);
|
||||
config.plugin('blogi-log').use(logPlugin, [
|
||||
{
|
||||
port,
|
||||
publicPath
|
||||
}
|
||||
]);
|
||||
|
||||
// create compiler from generated webpack config
|
||||
config = config.toConfig();
|
||||
|
@ -62,7 +63,7 @@ module.exports = async function dev(sourceDir, cliOptions = {}) {
|
|||
open: true,
|
||||
devMiddleware: {
|
||||
logLevel: 'warn',
|
||||
publicPath: props.publicPath
|
||||
publicPath
|
||||
},
|
||||
hotClient: {
|
||||
port: port + 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue