-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable tree shaking #316
Comments
If I understand correctly, we only have to keep the |
On second thoughts, we only need to change one line in "browser": "./src/stopword.js" That said, given that the whole module is now written in ES6, there is probably no good reason not to also set this for |
published a release candidate for testing purposes -> |
I'm not sure, but it may be that part of the change made Jsdelivr use go to almost zero. Jsdelivr statistics was going down quite a lot, but not in that order of magnitude. Anyway, it could be coincidental. The most used file in v2.0.8 looks identical in v3.0.0-rc1. https://cdn.jsdelivr.net/npm/[email protected]/dist/stopword.umd.min.js |
Hmm- strange. Publishing to npm with the tag I can see that the value of https://cdn.jsdelivr.net/npm/[email protected] is incorrect. It should probably be the same as https://cdn.jsdelivr.net/npm/[email protected] (pointing to the umd file in /dist). I will upload a 3.0.0-rc2 version where package.json includes the line Its worth a try at least! 😅 |
https://cdn.jsdelivr.net/npm/[email protected] looks better, so maybe downloads will pick up again..?😅 |
Nice! Hopefully it will =) |
I'm guessing that either the change had nothing to do with the decline in use of JsDelivr as CDN, or that it was one user that has switched to another way of using the library. Or if it wasn't important for them, they have found another solution. |
Its very strange that the downloads should change so much, but yes, we may just have lost one "megauser" |
I think you can release it as a proper v3.0 now. |
OK 👍 |
Just published on npm (will propagate out to jsdelivr) |
Is this issue because of the change? |
Possibly- will take a look. |
I am trying to tree shake
stopword
At the moment, when using a bundler such as Webpack or Rollup
stopword
will always include all lists of stopwords whether they are used or not. This means that bundled applications that include stopword will often be much larger than necessary.Example
In this gist, the compiled output of
npm test
includes all languages even though it should only include English stopwords.The Fix
Updating
package.json
as follows ->However- we have to make sure that the jsdeliver version continues to be generated
The text was updated successfully, but these errors were encountered: