Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader doesn't work, but plugin does #147

Open
Karmalakas opened this issue Jun 9, 2022 · 3 comments
Open

Loader doesn't work, but plugin does #147

Karmalakas opened this issue Jun 9, 2022 · 3 comments

Comments

@Karmalakas
Copy link

Karmalakas commented Jun 9, 2022

What am I missing? I have this config under module.rules:

                {
                    test: /\.js$/,
                    exclude: /node_modules/,
                    enforce: 'post',
                    use: {
                        loader: WebpackObfuscator.loader,
                        options: {
                            debugProtection: true,
                            disableConsoleOutput: true,
                            rotateStringArray: true,
                            selfDefending: true,
                        }
                    }
                }

And it doesn't obfuscate. But if I use it as a plugin:

            new WebpackObfuscator({
                debugProtection: true,
                disableConsoleOutput: true,
                rotateStringArray: true,
                selfDefending: true,
            }),

Then it works just fine 🤔

    "javascript-obfuscator": "^3.0.0",
    "webpack": "^5.65.0",
    "webpack-obfuscator": "^3.5.0"
@Karmalakas
Copy link
Author

Karmalakas commented Jun 25, 2022

Same with:

    "javascript-obfuscator": "^4.0.0",
    "webpack": "^5.73.0",
    "webpack-obfuscator": "^3.5.1"

@SSopin
Copy link

SSopin commented Oct 18, 2022

In my case, none of these work. Neither loader, nor plugin.

@shenxxu720
Copy link

What am I missing? I have this config under module.rules:我错过了什么?我在module.rules下有这个配置:

                {
                    test: /\.js$/,
                    exclude: /node_modules/,
                    enforce: 'post',
                    use: {
                        loader: WebpackObfuscator.loader,
                        options: {
                            debugProtection: true,
                            disableConsoleOutput: true,
                            rotateStringArray: true,
                            selfDefending: true,
                        }
                    }
                }

And it doesn't obfuscate. But if I use it as a plugin:而且它不会混淆。但是如果我将其用作插件:

            new WebpackObfuscator({
                debugProtection: true,
                disableConsoleOutput: true,
                rotateStringArray: true,
                selfDefending: true,
            }),

Then it works just fine 🤔然后它工作得很好 🤔

    "javascript-obfuscator": "^3.0.0",
    "webpack": "^5.65.0",
    "webpack-obfuscator": "^3.5.0"

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants