Browse Source

Adds patch for tr46 dependency

It is a large dependency, that isn't needed for our use of node-fetch
main
Eric Amodio 2 years ago
parent
commit
16ab932abf
2 changed files with 7 additions and 1 deletions
  1. +2
    -0
      patches/tr46.js
  2. +5
    -1
      webpack.config.js

+ 2
- 0
patches/tr46.js View File

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

+ 5
- 1
webpack.config.js View File

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

Loading…
Cancel
Save