-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29208 from storybookjs/norbert/remove-handlebars
Core: Remove `handlebars` usage
- Loading branch information
Showing
10 changed files
with
64 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,5 @@ code/.vite-inspect | |
.nx/cache | ||
!**/fixtures/**/yarn.lock | ||
code/core/report | ||
|
||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
code/builders/builder-webpack5/templates/virtualModuleModernEntry.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { createBrowserChannel } from 'storybook/internal/channels'; | ||
import { PreviewWeb, addons, composeConfigs } from 'storybook/internal/preview-api'; | ||
|
||
import { global } from '@storybook/global'; | ||
|
||
import { importFn } from '{{storiesFilename}}'; | ||
|
||
const getProjectAnnotations = () => composeConfigs(['{{previewAnnotations_requires}}']); | ||
|
||
const channel = createBrowserChannel({ page: 'preview' }); | ||
addons.setChannel(channel); | ||
|
||
if (global.CONFIG_TYPE === 'DEVELOPMENT') { | ||
window.__STORYBOOK_SERVER_CHANNEL__ = channel; | ||
} | ||
|
||
const preview = new PreviewWeb(importFn, getProjectAnnotations); | ||
|
||
window.__STORYBOOK_PREVIEW__ = preview; | ||
window.__STORYBOOK_STORY_STORE__ = preview.storyStore; | ||
window.__STORYBOOK_ADDONS_CHANNEL__ = channel; | ||
|
||
if (import.meta.webpackHot) { | ||
import.meta.webpackHot.accept('{{storiesFilename}}', () => { | ||
// importFn has changed so we need to patch the new one in | ||
preview.onStoriesChanged({ importFn }); | ||
}); | ||
|
||
import.meta.webpackHot.accept(['{{previewAnnotations}}'], () => { | ||
// getProjectAnnotations has changed so we need to patch the new one in | ||
preview.onGetProjectAnnotationsChanged({ getProjectAnnotations }); | ||
}); | ||
} |
34 changes: 0 additions & 34 deletions
34
code/builders/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters