exifreader
Advanced tools
Comparing version 3.12.4 to 3.12.5
@@ -19,3 +19,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
console.log('Installing ExifReader custom build dependencies...'); // eslint-disable-line no-console | ||
execSync('npm install --loglevel=error --no-optional --no-package-lock --no-save @babel/core @babel/preset-env @babel/register babel-loader cross-env string-replace-loader webpack webpack-cli terser-webpack-plugin', {stdio: 'inherit'}); | ||
execSync('npm install --production=false --loglevel=error --no-optional --no-package-lock --no-save @babel/core@7.9.0 @babel/preset-env@7.9.0 @babel/register@7.9.0 babel-loader@8.1.0 cross-env@5.2.0 string-replace-loader@2.2.0 webpack@4.44.1 webpack-cli@3.3.12 terser-webpack-plugin@2.3.8', {stdio: 'inherit'}); | ||
console.log('Done.'); // eslint-disable-line no-console | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "exifreader", | ||
"version": "3.12.4", | ||
"version": "3.12.5", | ||
"description": "Library that parses Exif metadata in images.", | ||
@@ -44,3 +44,3 @@ "author": "Mattias Wallander <mattias@wallander.eu>", | ||
"string-replace-loader": "^2.2.0", | ||
"terser-webpack-plugin": "^2.3.5", | ||
"terser-webpack-plugin": "^2.3.8", | ||
"webpack": "^4.44.1", | ||
@@ -47,0 +47,0 @@ "webpack-cli": "^3.3.12", |
@@ -178,2 +178,20 @@ ExifReader | ||
### Optimizing build size | ||
The most important step will be to [use a custom | ||
build](#configure-a-custom-build) so please do that. | ||
If you are using Webpack and are only targeting web browsers, make sure to add | ||
this to your Webpack config (probably the `webpack.config.js` file): | ||
```javascript | ||
node: { | ||
Buffer: false | ||
} | ||
``` | ||
`Buffer` is only used in Node.js but if Webpack sees a reference to it it will | ||
include a `Buffer` shim for browsers. This configuration will stop Webpack from | ||
doing that. | ||
### Configure a custom build | ||
@@ -183,5 +201,10 @@ | ||
**NOTE:** This functionality is in beta but should work fine. Please file an | ||
**NOTE 1:** This functionality is in beta but should work fine. Please file an | ||
issue if you're having problems or ideas on how to make it better. | ||
**NOTE 2:** This only changes the built file (`exifreader/dist/exif-reader.js`), | ||
not the source code. That means it's not possible to use the ES module (from the | ||
`src` folder) or any tree shaking to get the benefit of a custom build. Tree | ||
shaking will actually have close to no effect at all here so don't rely on it. | ||
This is for npm users that use the built file. To specify what functionality you | ||
@@ -188,0 +211,0 @@ want you can either use include pattern (start with an empty set and include) or |
475303
4947
457