diff --git a/packages/platform-web/src/shuvi-app/model/runtime.ts b/packages/platform-web/src/shuvi-app/model/runtime.ts index 5a92f4f0f..fcbdd8e26 100644 --- a/packages/platform-web/src/shuvi-app/model/runtime.ts +++ b/packages/platform-web/src/shuvi-app/model/runtime.ts @@ -1,4 +1,4 @@ -import { Doura, doura } from 'doura'; +import { Doura, doura, devtool } from 'doura'; import { createRuntimePlugin, getPageData, @@ -16,7 +16,8 @@ const isServer = typeof window === 'undefined'; const initStore: InitDoura = ({ initialState, ctx }) => { const createStoreInstance = () => { return doura({ - initialState + initialState, + plugins: process.env.NODE_ENV === 'development' ? [[devtool]] : [] }); }; // for server