|
"targets": { |
|
"main": { |
|
"source": "src/node.js", |
|
"context": "browser", |
|
"engines": { |
|
"browsers": "chrome >= 70" |
|
} |
|
}, |
|
"node-module": { |
|
"source": "src/node.js", |
|
"isLibrary": true, |
|
"includeNodeModules": false, |
|
"engines": { |
|
"browsers": "chrome >= 70" |
|
} |
|
}, |
|
"module": { |
|
"source": "src/index.js", |
|
"engines": { |
|
"browsers": "chrome >= 70" |
|
} |
|
}, |
|
"browser": { |
|
"source": "src/index.js", |
|
"engines": { |
|
"browsers": "chrome >= 70" |
|
} |
|
} |
|
}, |
|
"files": [ |
|
"src", |
|
"dist" |
|
], |
Currently the following is in the published npm package:
- sources
- ES module bundle
- browser bundle
- CommonJS bundle
- browser CommonJS bundle
On top of this source maps exist for each bundle.
maybe im missing something, but it seems we're now at the point where these are equivalent:
- ES module / browser
- CommonJS / browser CommonJS
The sources probably don't need to be published, and the sourcemaps are likely unused too (who is debugging fontkit in their node modules?).
Can we greatly simplify this to where we either ship ESM-only, or at least only the ESM/CJS bundles and no sourcemaps?
The gain here would be faster installs, and smaller install size.
fontkit/package.json
Lines 39 to 71 in fbf3b9e
Currently the following is in the published npm package:
On top of this source maps exist for each bundle.
maybe im missing something, but it seems we're now at the point where these are equivalent:
The sources probably don't need to be published, and the sourcemaps are likely unused too (who is debugging fontkit in their node modules?).
Can we greatly simplify this to where we either ship ESM-only, or at least only the ESM/CJS bundles and no sourcemaps?
The gain here would be faster installs, and smaller install size.