mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
Merge pull request #7845 from enagy27/addon-docs/ts-source-fix
Source-loader: Selectively ignore typescript errors in generated code
This commit is contained in:
commit
6a414d91eb
@ -15,16 +15,22 @@ export function transform(inputSource) {
|
||||
localDependencies,
|
||||
idsToFrameworks,
|
||||
}) => `
|
||||
// @ts-ignore-start
|
||||
// @ts-ignore
|
||||
var withSourceLoader = require('@storybook/source-loader/preview').withSource;
|
||||
// @ts-ignore
|
||||
var __SOURCE_PREFIX__ = "${prefix.replace(/\\([^\\ ])/g, '\\\\$1')}";
|
||||
// @ts-ignore
|
||||
var __STORY__ = ${sourceJson};
|
||||
// @ts-ignore
|
||||
var __ADDS_MAP__ = ${JSON.stringify(addsMap)};
|
||||
// @ts-ignore
|
||||
var __MAIN_FILE_LOCATION__ = ${JSON.stringify(resource)};
|
||||
// @ts-ignore
|
||||
var __MODULE_DEPENDENCIES__ = ${JSON.stringify(dependencies)};
|
||||
// @ts-ignore
|
||||
var __LOCAL_DEPENDENCIES__ = ${JSON.stringify(localDependencies)};
|
||||
// @ts-ignore
|
||||
var __IDS_TO_FRAMEWORKS__ = ${JSON.stringify(idsToFrameworks)};
|
||||
// @ts-ignore-end
|
||||
|
||||
${source}
|
||||
`
|
||||
|
Loading…
x
Reference in New Issue
Block a user