We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 189c26e commit 70f212aCopy full SHA for 70f212a
index.ts
@@ -21,8 +21,15 @@ class WebpackObfuscator {
21
}
22
23
public apply(compiler: Compiler): void {
24
- const pluginName = this.constructor.name;
+ const isDevServer = process.argv.find(v => v.includes('webpack-dev-server'));
25
+ if (isDevServer) {
26
+ console.info(
27
+ 'JavascriptObfuscator is disabled on webpack-dev-server as the reloading scripts ',
28
+ 'and the obfuscator can interfere with each other and break the build');
29
+ return;
30
+ }
31
32
+ const pluginName = this.constructor.name;
33
compiler.hooks.emit.tap(pluginName, (compilation: compilation.Compilation) => {
34
for (const fileName in compilation.assets) {
35
if (fileName.toLowerCase().endsWith('.js') || this.shouldExclude(fileName)) {
0 commit comments