Comments (1)
This is most likely because default imports get wrapped in a _interopDefault
function call by Babel. common-shake
does not know what this function does (it could do anything) so it marks all properties of the entire require()
call as "used" just to be safe. common-shake works best with untranspiled CommonJS modules. ES modules will likely get better support in browserify itself after Node settles on an implementation.
from common-shakeify.
Related Issues (20)
- Name is too long HOT 3
- Bundle not tree-shaked even in the most simple use case HOT 7
- SyntaxError: Unexpected token HOT 8
- does not remove imports that belongs to dead code which is removed by common-shake HOT 1
- Using b.require with react and react-dom results in an error HOT 6
- typedarray-pool is broken HOT 1
- require('os') is broken HOT 2
- remove unused modules if they have sideEffects: false HOT 1
- Errors on browserify -r HOT 2
- [email protected] crashes with browserify --full-paths option HOT 3
- Update Repo's description HOT 1
- Verbose mode throws an error when --full-paths flag is not used
- What is the "Could not redupe module ..." actually mean? HOT 3
- Fails to shake Apollo Client
- encountering a spread operator results in fatal error
- v1.1 has a bug compared to v0 and v1.0: require can't take a number HOT 3
- Just upgraded to v1 - TypeError: Cannot read properties of undefined (reading 'dedupe')
- Breaks split-require
- Browserify + common-shakeify + Chart.js = infinite stack trace HOT 1
- Updating `@babel/core` to version 7.22.15+ shakes out needed exports
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 common-shakeify.