Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
build: 修复开发时不能 link 的问题 (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck authored Jun 18, 2020
1 parent 7124817 commit 5509eb0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions e2e/dummy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@
"cross-env": "^7.0.2",
"jest": "^26.0.1",
"jest-puppeteer": "^4.4.0"
},
"workspaces": {
"nohoist": [
"react"
]
}
}
3 changes: 2 additions & 1 deletion e2e/mini/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
},
"workspaces": {
"nohoist": [
"mini-antui"
"mini-antui",
"react"
]
}
}
2 changes: 2 additions & 0 deletions packages/remax-cli/src/build/utils/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ interface Alias {
export default (options: Options, target: Platform) => {
const config: Alias = {
'@': path.resolve(options.cwd, options.rootDir),
// 防止 link 开发时加载多个 React
react: path.resolve(options.cwd, 'node_modules', 'react'),
// 配合 webpack-virtual-modules
'@remax/runtime-plugin': path.join(options.cwd, 'node_modules/@remax/runtime-plugin.js'),
};
Expand Down

1 comment on commit 5509eb0

@vercel
Copy link

@vercel vercel bot commented on 5509eb0 Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.