Skip to content

Commit

Permalink
fix: fix dependency issue. #412
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 27, 2023
1 parent 0a3638b commit f92b96f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/resolve-fallback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"assert": "^2.0.0",
"crypto-browserify": "^3.12.0",
"https-browserify": "^1.0.0",
"os": "^0.1.2",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.0"
"stream-http": "^3.2.0"
}
}
9 changes: 6 additions & 3 deletions packages/resolve-fallback/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ export default function resolveFallback(conf: Configuration): Configuration {
throw Error('KKT:@kkt/resolve-fallback: there is no config found');
}
conf.resolve.fallback = Object.assign(conf.resolve.fallback || {}, {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
assert: require.resolve('assert'),
buffer: require.resolve('buffer'),
fs: false,
path: false,
crypto: require.resolve('crypto-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify'),
os: require.resolve('os-browserify/browser'),
stream: require.resolve('stream-browserify'),
url: require.resolve('url'),
});
conf.plugins = (conf.plugins || []).concat([
Expand Down

0 comments on commit f92b96f

Please sign in to comment.