Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
plugin-bundler-webpack: adjust output during development according to…
Browse files Browse the repository at this point in the history
… pre-rendering (minimal)
  • Loading branch information
MoOx committed Dec 6, 2018
1 parent a48d6d1 commit 3893460
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions packages/plugin-bundler-webpack/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const bundlerWebpack: PhenomicPluginModule<{}> = config => {
name: pluginName,
addDevServerMiddlewares() {
debug("get middlewares");
const webpackConfig = getWebpackConfig(config);
// $FlowFixMe interface sucks
const compiler = webpack(getWebpackConfig(config));
const compiler = webpack(webpackConfig);
let assets = {};
// $FlowFixMe interface sucks
compiler.hooks.done.tap(pluginName + "/dev-server-middleware", stats => {
Expand Down Expand Up @@ -53,18 +54,12 @@ const bundlerWebpack: PhenomicPluginModule<{}> = config => {
next();
},
webpackDevMiddleware(compiler, {
logLevel: "warn",
publicPath: config.baseUrl.pathname,
stats: {
chunkModules: false,
assets: false,
},
logLevel: "warn",
stats: webpackConfig.stats,
// logger: log, // output info even if logLevel: "warn"
}),
webpackHotMiddleware(compiler, {
reload: true,
log,
}),
webpackHotMiddleware(compiler, { reload: true, log }),
];
},
buildForPrerendering() {
Expand Down

0 comments on commit 3893460

Please sign in to comment.