Skip to content

Commit

Permalink
fix: resolve react-router to internal deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengYuTay authored Jun 8, 2020
1 parent 49a3c53 commit 7006e90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/runtime-react/src/bundler/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export function config(api: IApi) {
// config.externals(external);
// make sure we don't have multiple entity of following packages , becasue module variable will fail
config.resolve.alias.set('@shuvi/runtime-react', PACKAGE_DIR);
config.resolve.alias.set('react-router-dom$', resolveLocal('react-router-dom'));
config.resolve.alias.set(
'react-router-dom$',
resolveLocal('react-router-dom')
);
config.resolve.alias.set('react-router$', resolveLocal('react-router'));

// WEBPACK5: using alias in webpack5
config.resolve.plugin('react-alias').use(AliasPlugin, [
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@
globals "^11.1.0"
lodash "^4.17.13"

"@babel/types@^7.0.0", "@babel/types@^7.10.1", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2", "@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5":
"@babel/types@7.10.1", "@babel/types@^7.0.0", "@babel/types@^7.10.1", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2", "@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5":
version "7.10.1"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.1.tgz#6886724d31c8022160a7db895e6731ca33483921"
integrity sha512-L2yqUOpf3tzlW9GVuipgLEcZxnO+96SzR6fjXMuxxNkIgFJ5+07mHCZ+HkHqaeZu8+3LKnNJJ1bKbjBETQAsrA==
Expand Down

0 comments on commit 7006e90

Please sign in to comment.