Skip to content

Commit b27b4ac

Browse files
lbogdanCompuIves
authored andcommitted
Development environment improvements (codesandbox#202)
* [dev] Don't show "[HMR]" info messages in the browser's console. * [dev] Enabled devServer error overlay. * [dev] Added NoEmitOnErrorsPlugin. * [dev] Added eslint-loader as a preloader for the main and embed apps.
1 parent a41c497 commit b27b4ac

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

config/webpack.common.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ module.exports = {
4343

4444
module: {
4545
rules: [
46+
{
47+
test: /\.js$/,
48+
loader: 'eslint-loader',
49+
enforce: 'pre',
50+
include: [paths.appSrc, paths.embedSrc],
51+
},
4652
{
4753
test: /\.js$/,
4854
include: paths.src,

config/webpack.dev.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = merge(
2222
output: {
2323
filename: 'static/js/[name].js',
2424
},
25-
plugins: [new webpack.HotModuleReplacementPlugin()],
25+
plugins: [
26+
new webpack.HotModuleReplacementPlugin(),
27+
new webpack.NoEmitOnErrorsPlugin(),
28+
],
2629
}
2730
);

scripts/start.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ function runDevServer(port, protocol, index) {
220220
host: process.env.LOCAL_SERVER ? 'localhost' : 'codesandbox.dev',
221221
disableHostCheck: !process.env.LOCAL_SERVER,
222222
contentBase: false,
223+
clientLogLevel: 'warning',
224+
overlay: true,
223225
});
224226

225227
// Our custom middleware proxies requests to /index.html or a remote API.

0 commit comments

Comments
 (0)