Bladeren bron

Adds patch for tr46 dependency

It is a large dependency, that isn't needed for our use of node-fetch
main
Eric Amodio 2 jaren geleden
bovenliggende
commit
16ab932abf
2 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. +2
    -0
      patches/tr46.js
  2. +5
    -1
      webpack.config.js

+ 2
- 0
patches/tr46.js Bestand weergeven

@ -0,0 +1,2 @@
function toASCII(d) { return d; }
module.exports = { toASCII };

+ 5
- 1
webpack.config.js Bestand weergeven

@ -195,7 +195,11 @@ function getExtensionConfig(target, mode, env) {
],
},
resolve: {
alias: { '@env': path.resolve(__dirname, 'src', 'env', target === 'webworker' ? 'browser' : target) },
alias: {
'@env': path.resolve(__dirname, 'src', 'env', target === 'webworker' ? 'browser' : target),
// This dependency is very large, and isn't needed for our use-case
tr46: path.resolve(__dirname, 'patches', 'tr46.js'),
},
fallback: target === 'webworker' ? { path: require.resolve('path-browserify') } : undefined,
mainFields: target === 'webworker' ? ['browser', 'module', 'main'] : ['module', 'main'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],

Laden…
Annuleren
Opslaan