Skip to content

Commit

Permalink
fix: build error (#384)
Browse files Browse the repository at this point in the history
Co-authored-by: tom.ww <[email protected]>
  • Loading branch information
wangjinyang and tom-ww-20230331 authored Aug 1, 2022
1 parent af6daeb commit 48403a4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"dev": "pnpm -r --stream --parallel run dev",
"build": "pnpm -r run build",
"clean": "pnpm -r --parallel exec rimraf node_modules lib esm && pnpm exec rimraf node_modules",
"clean": "pnpm -r --parallel exec rm -rf lib esm shuvi-app && find ./ -name 'node_modules' -type d -exec rm -rf '{}' +",
"shuvi": "node ./packages/shuvi/bin/cli.js",
"jest": "jest",
"test": "pnpm test:unit && pnpm test:e2e",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { RedoxWrapper } from './RedoxWrapper';

export default createRuntimePlugin({
appComponent: async (App, appContext) => {
return RedoxWrapper(App, { storeManager: appContext.store });
return RedoxWrapper(App, {
storeManager: appContext.store
});
}
});
10 changes: 10 additions & 0 deletions packages/platform-web/src/shuvi-app/react/redox-react/shuvi-app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { IStoreManager } from '@shuvi/redox';

// it's necessary. we need to turn it into a module
export {};

declare module '@shuvi/runtime' {
export interface CustomAppContext {
store: IStoreManager;
}
}
2 changes: 1 addition & 1 deletion packages/platform-web/src/shuvi-app/shuvi-runtime-index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// exported by @shuvi/runtme
// exported by @shuvi/runtime

import { IRequestHandlerWithNext } from '@shuvi/service';

Expand Down

0 comments on commit 48403a4

Please sign in to comment.