Skip to content

Commit c0fc197

Browse files
committed
needed because dist is in gitignore
1 parent f744f90 commit c0fc197

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.npmignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.git
3+
.gitignore
4+
.npmignore
5+
.travis.yml
6+
*.ts
7+
# include the .d.ts files
8+
!*.d.ts
9+
tsconfig.json

dist/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ var WebpackObfuscator = (function () {
1515
}
1616
WebpackObfuscator.prototype.apply = function (compiler) {
1717
var _this = this;
18+
var isDevServer = process.argv.find(function (v) { return v.includes('webpack-dev-server'); });
19+
if (isDevServer) {
20+
console.info('JavascriptObfuscator is disabled on webpack-dev-server as the reloading scripts ', 'and the obfuscator can interfere with each other and break the build');
21+
return;
22+
}
1823
var pluginName = this.constructor.name;
1924
compiler.hooks.emit.tap(pluginName, function (compilation) {
2025
for (var fileName in compilation.assets) {

0 commit comments

Comments
 (0)