Selaa lähdekoodia

Adds patch for tr46 dependency

It is a large dependency, that isn't needed for our use of node-fetch
main
Eric Amodio 2 vuotta sitten
vanhempi
commit
16ab932abf
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. +2
    -0
      patches/tr46.js
  2. +5
    -1
      webpack.config.js

+ 2
- 0
patches/tr46.js Näytä tiedosto

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

+ 5
- 1
webpack.config.js Näytä tiedosto

@ -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'],

Ladataan…
Peruuta
Tallenna