Comments (5)
I have same issue, and figured out that webpack-common-shake
is doing some transformation on reserved words.
The part of SockJS contains following code:
, number: function(max) {
return Math.floor(Math.random() * max);
}
, numberString: function(max) {
var t = ('' + (max - 1)).length;
var p = new Array(t + 1).join('0');
return (p + this.number(max)).slice(-t);
}
After the common-shake plugin above code is transformed as:
, "number": ((function(max) {
return Math.floor(Math.random() * max);
}),null)
which this.number
ended up being null
, instead of function.
from webpack-common-shake.
👍 That's exactly the same problem I have. It seems that the comma operator shouldn't be here.
from webpack-common-shake.
Hello!
I'll take a look at it later this week. It has nothing to do with reserved words, however, as number
is not one of them.
The way it adds comma and null
is a normal mode of operation. This function is unused in this library, so it isolates it for later removal by UglifyJS.
Will see what's the underlying problem a bit later.
Thanks for reporting!
from webpack-common-shake.
Hello @indutny thanks for all the work you have done so far! It definitely helped me a lot!
But starting from today, i started to encounter this issue as well. Do you have any updates regarding this problem?
from webpack-common-shake.
Having same issue when trying to use createVerify reexported from browserify-sign by browserify-crypto
from webpack-common-shake.
Related Issues (20)
- Cannot read property 'has' of null || TypeError: Cannot read property 'has' of null HOT 6
- TypeError: Cannot read property 'bailouts' of undefined HOT 16
- Usage with babel and uglifyJs HOT 1
- Global deoptimization from legacy files
- Support dynamic import using stable syntax HOT 2
- [QUESTION] Compatibility with other plugins
- False bailout for `require`.
- Issues with redux-observable
- False bailout with deep require
- [bug]Cannot set property 'options' of undefined
- One entry points spoils shaking for another one
- Shakes exports when they're used HOT 2
- Cannot read property 'resource' of null HOT 4
- Support Webpack v4 HOT 1
- webpack4 build error? HOT 1
- TypeError: Cannot read property 'forEach' of undefined
- Please upgrade to Webpack v5 HOT 8
- HookWebpackError: Cannot read properties of undefined (reading 'forEach')
- Module parse failed: BASE[type] is not a function HOT 9
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-common-shake.