Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
Closed
Description
Code:
// index.jsasyncfunctionmain(){constmod=awaitimport("./module");console.log(mod);}main();// module.jsexportconsttext="Hello World";
Error:
ERROR in ./src/index.jsModule build failed (from (webpack)-obfuscator/dist/loader/index.js):Error: SyntaxError: Unexpected token (2:20) at Function.parseCode (/Users/kevin/projects/webpack-obfuscator-demo/node_modules/webpack-obfuscator/dist/loader/index.js:63:23) at Function.getCommentedSource (/Users/kevin/projects/webpack-obfuscator-demo/node_modules/webpack-obfuscator/dist/loader/index.js:31:55) at Object.Loader (/Users/kevin/projects/webpack-obfuscator-demo/node_modules/webpack-obfuscator/dist/loader/index.js:84:63)Webpack config:
// webpack.config.jsconstpath=require("path");constWebpackObfuscator=require("webpack-obfuscator");module.exports={mode:"production",module:{rules:[{test:/\.js$/,include:[path.resolve(".","src")],enforce:"post",use:{loader:WebpackObfuscator.loader,options:{rotateStringArray:true,},},},],},};