Skip to content

Commit 268bc03

Browse files
authored
Merge pull request #33 from MichalPodeszwa/lower-built-bundle-size
[#23] Lower bundle size drastically
2 parents 5054d81 + 6d5aa8f commit 268bc03

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
## Installing
1717

18-
Install ``filestack-react`` through npm
18+
Install ``filestack-react`` and ``filestack-js`` through npm
1919

2020
```shell
21-
npm install filestack-react
21+
npm install filestack-react filestack-js
2222
```
2323
or
2424
```shell
25-
yarn add filestack-react
25+
yarn add filestack-react filestack-js
2626
```
2727
## Import
2828
```javascript

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "react component for filestack",
66
"scripts": {
77
"test": "jest --watch --no-cache --coverage",
8-
"build": "rimraf dist && webpack --colors --debug --display-error-details",
8+
"build": "rimraf dist && webpack --colors -p --display-error-details",
99
"prepublish": "npm run build",
1010
"lint": "eslint"
1111
},
@@ -66,8 +66,9 @@
6666
"style-loader": "^0.16.0",
6767
"webpack": "^2.3.2"
6868
},
69-
"dependencies": {
70-
"filestack-js": "^0.9.1"
69+
"peerDependencies": {
70+
"filestack-js": "^0.9.8",
71+
"react": "^15.5.4"
7172
},
7273
"jest": {
7374
"roots": [

webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ module.exports = {
88
output: {
99
path: path.join(__dirname, 'dist'),
1010
filename: 'filestack-react.js',
11-
libraryTarget: 'commonjs2',
11+
libraryTarget: 'umd',
1212
},
1313
devtool: 'source-map',
1414
resolve: {
1515
modules: ['node_modules', 'src'],
1616
extensions: ['.js', '.json', '.jsx'],
1717
},
1818
module: { rules },
19+
externals: [
20+
'react', 'filestack-js', 'prop-types'
21+
],
1922
plugins: [
2023
new webpack.LoaderOptionsPlugin({
2124
minimize: true,

yarn.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,10 +2129,6 @@ fileset@^2.0.2:
21292129
glob "^7.0.3"
21302130
minimatch "^3.0.3"
21312131

2132-
filestack-js@^0.9.1:
2133-
version "0.9.1"
2134-
resolved "https://registry.yarnpkg.com/filestack-js/-/filestack-js-0.9.1.tgz#8591dba23c0f1a227631233df6f2f07cb81a6c4d"
2135-
21362132
fill-range@^2.1.0:
21372133
version "2.2.3"
21382134
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"

0 commit comments

Comments
 (0)