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

Commit

Permalink
fix(web): 修复构建错误
Browse files Browse the repository at this point in the history
close #934
  • Loading branch information
yesmeck committed May 13, 2020
1 parent e887587 commit b99177f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions packages/remax-cli/src/build/webpack/config.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export default function webpackConfig(api: API, options: Options): webpack.Confi
},
]);

config.plugin('define-plugin').use(webpack.DefinePlugin, [
{
__REMAX_HOST_COMPONENTS__: JSON.stringify({}),
},
]);

config.plugin('webpackbar').use(WebapckBar, [{ name: 'web' }]);

config
Expand Down
2 changes: 1 addition & 1 deletion packages/remax-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"history": "^4.10.1",
"react-router-cache-route": "^1.8.4",
"@remax/react-router-cache-route": "^1.8.4",
"react-router-dom": "^5.1.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/remax-router/web.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createHashHistory } from 'history';
export { CacheRoute, CacheSwitch } from 'react-router-cache-route';
export { CacheRoute, CacheSwitch } from '@remax/react-router-cache-route';

export const history = createHashHistory();

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2407,6 +2407,11 @@
object-assign "^4.1.1"
postcss "^6.0.19"

"@remax/react-router-cache-route@^1.8.4":
version "1.8.4"
resolved "https://registry.yarnpkg.com/@remax/react-router-cache-route/-/react-router-cache-route-1.8.4.tgz#cf9ddad48b9ee5ef8439c705f2c865bd2c673543"
integrity sha512-W17U/5/y6ZjMdfVw400AY3hrBJCr6UC+f/6VUANU0O41pH68eGY0gwxRlR3aa6eQfT6ztMSfvLLPjzBAOjhoKg==

"@samverschueren/stream-to-observable@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f"
Expand Down Expand Up @@ -13490,11 +13495,6 @@ [email protected], react-reconciler@^0.25.1:
prop-types "^15.6.2"
scheduler "^0.19.1"

react-router-cache-route@^1.8.4:
version "1.8.4"
resolved "https://registry.yarnpkg.com/react-router-cache-route/-/react-router-cache-route-1.8.4.tgz#57523803f14edd1e04c2de951451d97c5d27c971"
integrity sha512-cj84gIDqQdNMMKVFD66V4Tc2FKEEq5DvARFpyEbrrBFWn54HsVkZxFRsjkgVZtTNiYqXSp7pP0N8tuoHEtUj6Q==

[email protected]:
version "5.1.1"
resolved "https://registry.yarnpkg.com/react-router-config/-/react-router-config-5.1.1.tgz#0f4263d1a80c6b2dc7b9c1902c9526478194a988"
Expand Down

0 comments on commit b99177f

Please sign in to comment.