javascript-obfuscator / javascript-obfuscator/webpack-obfuscator
webpack-obfuscator not working on Firebase deployment
- Dominant language
- TypeScript
- Stars
- 928
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
`webpack-obfuscator` and `javacript-obfuscator` should be working on Firebase deployment without issue
## Current Behavior
My firebase functions are deployed correctly unless I import `webpack-obfuscator` or `javacript-obfuscator`
Always produce error
```
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'webpack-obfuscator'
```
| | webpack-obfuscator | javacript-obfuscator |
|--|----------------|----------|
| sample code |
|
|
| error |
|
|
## Steps to Reproduce
- Install `webpack-obfuscator`
- Run `firebase emulators:start` to test the function, it working properly
- Run `firebase deploy` the functions can not be deployed
## Enviroment
- Node 14
- "webpack-obfuscator": "3.5.1",
- "javascript-obfuscator": "4.0.2"
## Reference
I have taken a look at these issues, but either they are outdated or not work
- https://github.com/javascript-obfuscator/javascript-obfuscator/issues/687
- https://github.com/javascript-obfuscator/webpack-obfuscator/issues/138
- https://github.com/javascript-obfuscator/webpack-obfuscator/issues/82#issue-667058896
cc: @sanex3339 since you found a bug in [loader](https://github.com/javascript-obfuscator/javascript-obfuscator/issues/687#issuecomment-665271638) ( but it was 3 years ago )
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the package.json dependencies and the Firebase Functions deployment configuration used by the reproduction; compare the working firebase emulators:start path with firebase deploy. Verify the obfuscator packages are available in the deployed function, using the reported Cannot find module error as the completion check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, javascript, node.js, typescript, webpack
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100