mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
fix(storybook): disable cloud for storybook (#5330)
This commit is contained in:
@@ -34,6 +34,14 @@ export default {
|
|||||||
name: '@storybook/react-vite',
|
name: '@storybook/react-vite',
|
||||||
},
|
},
|
||||||
async viteFinal(config, _options) {
|
async viteFinal(config, _options) {
|
||||||
|
const runtimeConfig = getRuntimeConfig({
|
||||||
|
distribution: 'browser',
|
||||||
|
mode: 'development',
|
||||||
|
channel: 'canary',
|
||||||
|
coverage: false,
|
||||||
|
});
|
||||||
|
// disable for storybook build
|
||||||
|
runtimeConfig.enableCloud = false;
|
||||||
return mergeConfig(config, {
|
return mergeConfig(config, {
|
||||||
assetsInclude: ['**/*.md'],
|
assetsInclude: ['**/*.md'],
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -59,12 +67,7 @@ export default {
|
|||||||
)}`,
|
)}`,
|
||||||
'process.env.TRACE_REPORT_ENDPOINT': `"${process.env.TRACE_REPORT_ENDPOINT}"`,
|
'process.env.TRACE_REPORT_ENDPOINT': `"${process.env.TRACE_REPORT_ENDPOINT}"`,
|
||||||
'process.env.CAPTCHA_SITE_KEY': `"${process.env.CAPTCHA_SITE_KEY}"`,
|
'process.env.CAPTCHA_SITE_KEY': `"${process.env.CAPTCHA_SITE_KEY}"`,
|
||||||
runtimeConfig: getRuntimeConfig({
|
runtimeConfig: runtimeConfig,
|
||||||
distribution: 'browser',
|
|
||||||
mode: 'development',
|
|
||||||
channel: 'canary',
|
|
||||||
coverage: false,
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user