-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
switch from browserify to webpack #1140
Conversation
@@ -10,5 +10,7 @@ runs: | |||
path: | | |||
node_modules | |||
packages/*/dist | |||
packages/*/es | |||
packages/jimp/browser/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We weren't caching all the build files so that's why they weren't there
@@ -77,21 +77,6 @@ If you're using a web bundles (webpack, rollup, parcel) you can benefit from usi | |||
import Jimp from "jimp/es"; | |||
``` | |||
|
|||
### WebPack | |||
|
|||
If you're using webpack you can set `process.browser` to true and your build of jimp will exclude certain parts, making it load faster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a problem anymore and was always a misunderstanding on how to make a browser bundle 😓
"typesVersions": { | ||
">=3.1.0-0": { | ||
"*": [ | ||
"types/ts3.1/index.d.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not interested in supporting ancient TS versions
const isProd = process.env.NODE_ENV === "production"; | ||
|
||
export default { | ||
mode: isProd ? "production" : "development", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Webpack is sooooo much simpler than a custom browserify scrip
@@ -24,7 +24,7 @@ | |||
}, | |||
"dependencies": { | |||
"@babel/runtime": "^7.7.2", | |||
"pngjs": "^3.3.3" | |||
"pngjs": "^6.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgraded pngjs along the way too
🚀 PR was released in |
closes #1139
closes #1132
📦 Published PR as canary version:
0.17.9--canary.1140.e3ff49d.0
✨ Test out this PR locally via:
npm install @jimp/cli@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/core@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/custom@0.17.9--canary.1140.e3ff49d.0 npm install jimp@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-blit@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-blur@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-circle@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-color@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-contain@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-cover@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-crop@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-displace@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-dither@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-fisheye@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-flip@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-gaussian@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-invert@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-mask@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-normalize@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-print@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-resize@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-rotate@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-scale@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-shadow@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugin-threshold@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/plugins@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/test-utils@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/bmp@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/gif@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/jpeg@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/png@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/tiff@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/types@0.17.9--canary.1140.e3ff49d.0 npm install @jimp/utils@0.17.9--canary.1140.e3ff49d.0 # or yarn add @jimp/cli@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/core@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/custom@0.17.9--canary.1140.e3ff49d.0 yarn add jimp@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-blit@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-blur@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-circle@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-color@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-contain@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-cover@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-crop@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-displace@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-dither@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-fisheye@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-flip@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-gaussian@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-invert@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-mask@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-normalize@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-print@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-resize@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-rotate@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-scale@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-shadow@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugin-threshold@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/plugins@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/test-utils@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/bmp@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/gif@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/jpeg@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/png@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/tiff@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/types@0.17.9--canary.1140.e3ff49d.0 yarn add @jimp/utils@0.17.9--canary.1140.e3ff49d.0
Release Notes
This PR can be considered a breaking change as it remove the
jimp.min.js
file.Instead there is now only the
jimp.js
file and we ship source maps for it.We also configured the
browser
field so jimp will be automatically bundled better