Skip to content

Commit f936ad4

Browse files
committed
fix: disable webpackbar in development
1 parent f349dc7 commit f936ad4

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

Diff for: src/module.js

+26-25
Original file line numberDiff line numberDiff line change
@@ -66,33 +66,34 @@ export default function NetlifyCmsModule(moduleOptions) {
6666
}
6767
});
6868

69-
webpackConfig.plugins.push(
70-
new WebpackBar({
71-
name: WEBPACK_NETLIFY_COMPILER_NAME,
72-
color: "red",
73-
reporters: ["basic", "fancy", "profile", "stats"],
74-
basic: !this.options.build.quiet && env.minimalCLI,
75-
fancy: !this.options.build.quiet && !env.minimalCLI,
76-
profile: !this.options.build.quiet && this.options.build.profile,
77-
stats:
78-
!this.options.build.quiet &&
79-
!this.options.dev &&
80-
this.options.build.stats,
81-
reporter: {
82-
change: (_, { shortPath }) => {
83-
this.nuxt.callHook("bundler:change", shortPath);
84-
},
85-
done: context => {
86-
if (context.hasErrors) {
87-
this.nuxt.callHook("bundler:error");
69+
!this.options.dev &&
70+
webpackConfig.plugins.push(
71+
new WebpackBar({
72+
name: WEBPACK_NETLIFY_COMPILER_NAME,
73+
color: "red",
74+
reporters: ["basic", "fancy", "profile", "stats"],
75+
basic: !this.options.build.quiet && env.minimalCLI,
76+
fancy: !this.options.build.quiet && !env.minimalCLI,
77+
profile: !this.options.build.quiet && this.options.build.profile,
78+
stats:
79+
!this.options.build.quiet &&
80+
!this.options.dev &&
81+
this.options.build.stats,
82+
reporter: {
83+
change: (_, { shortPath }) => {
84+
this.nuxt.callHook("bundler:change", shortPath);
85+
},
86+
done: context => {
87+
if (context.hasErrors) {
88+
this.nuxt.callHook("bundler:error");
89+
}
90+
},
91+
allDone: () => {
92+
this.nuxt.callHook("bundler:done");
8893
}
89-
},
90-
allDone: () => {
91-
this.nuxt.callHook("bundler:done");
9294
}
93-
}
94-
})
95-
);
95+
})
96+
)
9697

9798
const netlifyCompiler = webpack(webpackConfig);
9899

0 commit comments

Comments
 (0)