Comments (4)
I'll be glad if you take a look at this.
from webpack-obfuscator.
OK, I'll give it a go.
from webpack-obfuscator.
I have a simple example working with sorucemaps. It's quite easy to implement using this module: https://github.com/azu/multi-stage-sourcemap
For now I just hacked by doing this in the index.js
file:
_this.options.sourceMap = true;
var asset = compilation.assets[file], obfuscationResult = JavaScriptObfuscator.obfuscate(asset.source(), _this.options);
var originalSourceMap = asset.map();
var obfuscationSourceMap = obfuscationResult.getSourceMap();
var transferedSourceMap = transferSourceMap({fromSourceMap: obfuscationSourceMap, toSourceMap: originalSourceMap});
compilation.assets[file] = new SourceMapSource(obfuscationResult.toString(), file, JSON.parse(transferedSourceMap), asset.source(), originalSourceMap);
It needs proper checking for an initial sourcemap and all, but you get the point.
Now, I see that your source code is actually a typescript file. I never used that, but I can give it a try and make a pull request after.
from webpack-obfuscator.
Out in [email protected]
Big thanks for help!
from webpack-obfuscator.
Related Issues (20)
- Is there any option that can output the filename matched by webpack-obfuscator loader in the console?
- does webpack-obfuscator support nuxtjs3 ?
- Obfuscate method names in objects/classes. HOT 1
- hashes are breaking chunk loading when using "split strings" or "medium" preset
- Compatibility with Module Federation plugin
- DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
- Loader doesn't work, but plugin does HOT 2
- webpack-obfuscator is not generating sourcemaps HOT 4
- Is there a Vue framework use case?
- webpack-obfuscator not working on Firebase deployment HOT 1
- webpack > 5 it's not working
- Webpack version compatible
- cannot read property of undefined reading sourceAndMap
- Security.md file?
- how to obfuscate select multiple .vue file in nuxt2
- help with excluding a 10mb file from obfuscation
- Exclude files
- use webpack-obfuscator in Vue has a error when build the vue project
- Obfuscation doesn't work on ionic angular mobile iOS app
- Does it work with CSS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-obfuscator.