Answer the question
In order to leave comments, you need to log in
How to obfuscate a React app?
For example, I created a simple React application:
npx create-react-app my-app
Then I need to obfuscate the js code. First I found a great tool - Jscrambler, but it's paid. Then I googled about webpack obfuscation and found webpack-obfuscator . According to their documentation, I added the following lines to the webpack.config.js file
:
var WebpackObfuscator = require('webpack-obfuscator');
{
test: /\.js$/,
exclude: [],
enforce: 'post',
use: {
loader: WebpackObfuscator.loader,
options: {
rotateStringArray: true
}
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question