This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Commit dc14333
fix: configure webpack to not use esmodules in dependencies
Big.js just released an update that added esmodule support by adding a "module" field to their package.json. By default, webpack will use this field when requiring a module. Since esmodules aren't fully supported in the browser and we don't do any transpiling this PR configures webpack to not consider the esmodule field.
[Webpack `mainFields` docs](https://webpack.js.org/configuration/resolve/#resolve-mainfields)
[Why `require('big.js')` is broken for us](webpack/webpack#4742)
Refs ipfs/js-ipfs#1363
Note that this solves the issue for `big.js`, but also for any other modules in the future that decide to define a `module` field in their `package.json` or any that already do and we just haven't realised it yet!
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>1 parent 3c695af commit dc14333
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
0 commit comments