Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 4486acc

Browse files
alanshawdaviddias
authored andcommittedMay 28, 2018
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) Fixes #1363 License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
1 parent b8171b1 commit 4486acc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎.aegir.js

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ const createServer = require('ipfsd-ctl').createServer
55
const server = createServer()
66

77
module.exports = {
8+
webpack: {
9+
resolve: {
10+
mainFields: ['browser', 'main']
11+
}
12+
},
813
karma: {
914
files: [{
1015
pattern: 'node_modules/interface-ipfs-core/js/test/fixtures/**/*',

0 commit comments

Comments
 (0)
This repository has been archived.