Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Prerelease 8.2.0-alpha.3 #27214

Merged
merged 107 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
2952d41
fix date validation and input value assign
leeovictor Mar 30, 2024
895010a
fix date validation and input value assign
leeovictor Mar 30, 2024
f02d94e
remove empty string check
leeovictor Mar 30, 2024
c0ea5da
Merge branch 'next' into date-picker-fix
leeovictor Apr 4, 2024
94731f3
Merge branch 'next' into date-picker-fix
leeovictor Apr 20, 2024
f2cc084
Merge branch 'next' into date-picker-fix
leeovictor Apr 22, 2024
05aad8c
Merge branch 'next' into date-picker-fix
leeovictor May 5, 2024
61ad788
Vite: Externalize sb-common-assets fonts to remove warning
valentinpalkovic May 13, 2024
f9ea53f
docs: remove unused imports
kongallis May 15, 2024
dc49f4c
Update ghp-github-action.yml.mdx
Girgetto May 15, 2024
8c6bdff
Merge branch 'next' into remove-unused-imports
kongallis May 15, 2024
9a04b4c
Build: Remove @storybook/testing-library from internal sandbox genera…
yannbf May 16, 2024
9667b1e
Webpack5: Fix sourcemaps
valentinpalkovic May 16, 2024
19fb74d
Deprecate @storybook/csf-plugin and remove references
valentinpalkovic May 16, 2024
61ecef8
Fix addon-docs
valentinpalkovic May 16, 2024
0200052
Fix addon-docs
valentinpalkovic May 16, 2024
739cf3b
fix wrong CompatibleString type implementation
sni-J May 17, 2024
c2bc5f8
Merge branch 'next' into remove-unused-imports
kongallis May 17, 2024
04378b7
Vite: Fix sourcemapping for CSF files
valentinpalkovic May 17, 2024
72eadaa
release majors/minors from next-release and force push to main+latest…
JReinhold May 17, 2024
5cb8045
Small fixes
valentinpalkovic May 17, 2024
8a84014
Next.js: Avoid interfering with the svgr loader
seanparmelee May 19, 2024
0d19258
Merge branch 'next' into patch-1
Girgetto May 19, 2024
3beb27c
fix(docs): correct typo in vue preview docs
AlirezaEbrahimkhani May 19, 2024
a5c7f7f
Merge pull request #27182 from storybookjs/jeppe/simplify-minor-releases
shilman May 19, 2024
67c2b75
Docs: Fix RFC schedule
shilman May 20, 2024
6779587
Docs: Add public roadmap
shilman May 20, 2024
e802beb
Merge branch 'next' into remove-unused-imports
kongallis May 20, 2024
8184e84
Update URL to `/contribute/roadmap`
kylegach May 20, 2024
679d20a
Typo
kylegach May 20, 2024
5b96c5e
Merge pull request #27200 from storybookjs/shilman/fix-rfc-schedule
shilman May 21, 2024
ffb7ef7
Merge pull request #27201 from storybookjs/shilman/add-roadmap
shilman May 21, 2024
84fa690
Merge pull request #27198 from seanparmelee/raw-conflicts-redux
valentinpalkovic May 21, 2024
f81ba26
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 21, 2024
d429ce0
Sandbox: Fix reactivity in Svelte Pre component
valentinpalkovic May 21, 2024
ad019b5
Merge pull request #27216 from storybookjs/valentin/fix-reactivity-is…
valentinpalkovic May 21, 2024
5f21385
Merge branch 'next' into remove-unused-imports
kongallis May 21, 2024
9986a78
Update CHANGELOG.md for v8.1.2 [skip ci]
storybook-bot May 21, 2024
cc98d12
Addon-A11y: Fix property default assignment
valentinpalkovic May 22, 2024
94cb5fc
Manager/Webpack5: Remove fonts.css and directly use font-face assignm…
valentinpalkovic May 22, 2024
6b47b6f
Merge remote-tracking branch 'origin/next' into valentin/fix-webpack5…
valentinpalkovic May 22, 2024
0616c33
Merge pull request #27180 from sni-J/23232-27088-compatible-string-im…
valentinpalkovic May 22, 2024
051b3ef
Merge branch 'next' into date-picker-fix
valentinpalkovic May 22, 2024
c48a51e
Build: Exclude stories from snapshotting
valentinpalkovic May 22, 2024
9226a94
Merge pull request #26695 from leeovictor/date-picker-fix
valentinpalkovic May 22, 2024
8997a94
Merge branch 'next' into valentin/fix-a11y-default-assignment
valentinpalkovic May 22, 2024
fb255d9
Merge pull request #27225 from storybookjs/valentin/disable-snapshott…
valentinpalkovic May 22, 2024
5e67491
Merge branch 'next' into valentin/fix-does-not-exist-at-build-time
valentinpalkovic May 22, 2024
ff23e1f
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 22, 2024
2d38257
Merge branch 'next' into valentin/fix-a11y-default-assignment
valentinpalkovic May 22, 2024
fb8b18f
Merge pull request #27224 from storybookjs/valentin/fix-a11y-default-…
valentinpalkovic May 22, 2024
59bf7a2
Merge pull request #27110 from storybookjs/valentin/fix-does-not-exis…
valentinpalkovic May 22, 2024
6fe4e7f
Telemetry: Add test packages
shilman May 22, 2024
e1bbf6f
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 22, 2024
e812f77
Merge pull request #27226 from storybookjs/shilman/test-package-telem…
shilman May 22, 2024
093342f
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 23, 2024
9f1ec03
Revert "Deprecate @storybook/csf-plugin and remove references"
valentinpalkovic May 23, 2024
8537e14
Rework csf-plugin to guarantee sourcemap functionality in all builders
valentinpalkovic May 23, 2024
13ace46
Revert: Small fixes
valentinpalkovic May 23, 2024
6c8c4ca
Revert "Vite: Fix sourcemapping for CSF files"
valentinpalkovic May 23, 2024
08cf1ad
Revert "Fix addon-docs"
valentinpalkovic May 23, 2024
aeb5c1f
Revert "Fix addon-docs"
valentinpalkovic May 23, 2024
ac6c1e5
Partially Revert "Webpack5: Fix sourcemaps"
valentinpalkovic May 23, 2024
780ef97
Fix sourcemaps across loaders and builders
valentinpalkovic May 23, 2024
bc3945f
Angular: Support v18
valentinpalkovic May 23, 2024
f2a0cc2
Merge pull request #27237 from storybookjs/valentin/support-angular-18
valentinpalkovic May 23, 2024
aa628d6
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 23, 2024
480374a
Update CHANGELOG.md for v8.1.3 [skip ci]
storybook-bot May 23, 2024
12e4e1e
Merge branch 'next' into patch-1
Girgetto May 23, 2024
525bd60
Vite: Fix HMR issue for Storybook preview files
valentinpalkovic May 23, 2024
a454774
Merge branch 'next' into fix-preview-code-snippets
jonniebigodes May 23, 2024
6c04751
Merge pull request #27256 from storybookjs/valentin/fix-hmr-issue-in-…
valentinpalkovic May 23, 2024
fc9e330
Merge branch 'next' into fix-preview-code-snippets
jonniebigodes May 23, 2024
337192a
Merge pull request #27199 from AlirezaEbrahimkhani/fix-preview-code-s…
jonniebigodes May 23, 2024
420dd00
Merge branch 'next' into patch-1
jonniebigodes May 23, 2024
99882a3
Merge pull request #27150 from Girgetto/patch-1
jonniebigodes May 23, 2024
c5f9332
Merge branch 'next' into valentin/fix-webpack5-sourcemaps
valentinpalkovic May 23, 2024
be4933b
Merge branch 'next' into remove-unused-imports
jonniebigodes May 23, 2024
122a83f
Merge pull request #27146 from kongallis/remove-unused-imports
jonniebigodes May 23, 2024
47f46c8
Docs: Test runner add missing flag to the CLI options
jonniebigodes May 23, 2024
00619f9
Fix csf plugin for webpack and rspack
valentinpalkovic May 24, 2024
a579b28
Remove includeContent option in magic string source map generation
valentinpalkovic May 24, 2024
c106a52
Fix sourcemaps for Vite
valentinpalkovic May 24, 2024
a9f1e1d
Fix sourcemaps for Webpack5
valentinpalkovic May 24, 2024
c09e33a
Tags: Fix composition with older storybooks
shilman May 24, 2024
288c917
Tags: Add E2E tests for older composed storybooks
shilman May 24, 2024
da79c3d
Update snapshots
shilman May 24, 2024
ad20171
Fixed tests to refer to v5 except for special v4 test
shilman May 24, 2024
a6bdab7
Merge branch 'next' into shilman/27352-fix-tags-composition
shilman May 24, 2024
8ae46ab
Merge pull request #27171 from storybookjs/valentin/fix-webpack5-sour…
valentinpalkovic May 24, 2024
fc915d6
Merge pull request #27358 from storybookjs/shilman/27352-fix-tags-com…
shilman May 24, 2024
5a65566
Merge branch 'next' into docs_test_runner_timeout_option
jonniebigodes May 24, 2024
02b7619
Merge pull request #27350 from storybookjs/docs_test_runner_timeout_o…
jonniebigodes May 24, 2024
695cf8d
Revert "Angular: Cleanup types"
valentinpalkovic May 24, 2024
2255ede
Revert "Angular: Consider style inject option"
valentinpalkovic May 24, 2024
346f951
Merge pull request #27361 from storybookjs/valentin/revert-angular-st…
valentinpalkovic May 24, 2024
b84b9c7
Docs: Fix MSW snippets
jonniebigodes May 24, 2024
d5a20ab
Merge pull request #27365 from storybookjs/docs_fix_msw_snippets
jonniebigodes May 24, 2024
b94ad44
Merge pull request #27168 from storybookjs/yann/remove-sb-testing-lib…
shilman May 25, 2024
595a08c
Svelte: Support latest prerelease
valentinpalkovic May 27, 2024
ca8a0d1
Fix Corepack issue
valentinpalkovic May 27, 2024
4ac11ac
Enable Corepack for sandbox builds
valentinpalkovic May 27, 2024
921b569
Fix Svelte stories
valentinpalkovic May 27, 2024
9e85db1
Fix play function for Svelte Story
valentinpalkovic May 27, 2024
21f0964
Linting
valentinpalkovic May 27, 2024
a389363
Merge pull request #27378 from storybookjs/valentin/fix-svelte-prerel…
valentinpalkovic May 27, 2024
32fbdcf
Write changelog for 8.2.0-alpha.3 [skip ci]
storybook-bot May 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
default: "skipped"

executors:
sb_node_16_classic:
sb_node_18_classic:
parameters:
class:
description: The Resource class
Expand All @@ -21,7 +21,7 @@ executors:
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
sb_node_16_browsers:
sb_node_18_browsers:
parameters:
class:
description: The Resource class
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
pretty-docs:
executor:
class: medium
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -125,7 +125,7 @@ jobs:
build:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
lint:
executor:
class: large
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -185,7 +185,7 @@ jobs:
check:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -202,7 +202,7 @@ jobs:
- report-workflow-on-failure
- cancel-workflow-on-failure
script-checks:
executor: sb_node_16_browsers
executor: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
unit-tests:
executor:
class: xlarge
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -252,7 +252,7 @@ jobs:
coverage:
executor:
class: small
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -263,7 +263,7 @@ jobs:
chromatic-internal-storybooks:
executor:
class: medium+
name: sb_node_16_browsers
name: sb_node_18_browsers
environment:
NODE_OPTIONS: --max_old_space_size=6144
steps:
Expand All @@ -287,13 +287,16 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Enable Corepack
command: sudo corepack enable yarn
- run:
name: Creating Sandboxes
command: yarn task --task sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) --no-link --start-from=never --junit
Expand All @@ -311,7 +314,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -331,7 +334,7 @@ jobs:
type: integer
executor:
class: large
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand Down Expand Up @@ -410,7 +413,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- checkout
Expand Down Expand Up @@ -493,7 +496,7 @@ jobs:
test-empty-init:
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parameters:
packageManager:
type: string
Expand Down
20 changes: 1 addition & 19 deletions .github/workflows/prepare-non-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ jobs:
run: |
yarn release:version --deferred --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose

- name: Check release vs prerelease
id: is-prerelease
run: yarn release:is-prerelease ${{ steps.bump-version.outputs.next-version }} --verbose

- name: Write changelog
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -133,19 +129,6 @@ jobs:
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }} [skip ci]" || true
git push --force origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}

- name: Resolve merge-conflicts with base branch
if: steps.is-prerelease.outputs.prerelease == 'false'
working-directory: .
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config pull.rebase false
git pull --no-commit --no-ff origin latest-release || true
git checkout --ours .
git add .
git commit --no-verify -m "Merge latest-release into version-non-patch-from-${{ steps.bump-version.outputs.current-version }} with conflicts resolved to ours [skip ci]"
git push origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}

- name: Generate PR description
id: description
env:
Expand All @@ -162,14 +145,13 @@ jobs:
gh pr edit \
--repo "${{github.repository }}" \
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--label "release" \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--base next-release \
--head version-non-patch-from-${{ steps.bump-version.outputs.current-version }} \
--body "${{ steps.description.outputs.description }}"
fi
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ jobs:
git merge ${{ github.ref_name }}
git push origin ${{ steps.target.outputs.target }}

- name: Force push from 'next' to 'latest-release' and 'main' on minor/major releases
if: github.ref_name == 'next-release' && steps.is-prerelease.outputs.prerelease == 'false'
run: |
git checkout next
git pull
git push --force origin latest-release
git push --force origin main

- name: Sync CHANGELOG.md from `main` to `next`
if: steps.target.outputs.target == 'main'
working-directory: .
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 8.1.3

- Angular: Support v18 - [#27237](https://github.com/storybookjs/storybook/pull/27237), thanks @valentinpalkovic!
- Telemetry: Add test packages - [#27226](https://github.com/storybookjs/storybook/pull/27226), thanks @shilman!

## 8.1.2

- Angular: Fix filtering of workspace config styles - [#27108](https://github.com/storybookjs/storybook/pull/27108), thanks @valentinpalkovic!
- Next.js: Avoid interfering with the svgr loader - [#27198](https://github.com/storybookjs/storybook/pull/27198), thanks @seanparmelee!

## 8.1.1

- Docgen: Only add react-docgen info when a component is defined in the file - [#26967](https://github.com/storybookjs/storybook/pull/26967), thanks @glenjamin!
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 8.2.0-alpha.3

- Addon-A11y: Fix property default assignment - [#27224](https://github.com/storybookjs/storybook/pull/27224), thanks @valentinpalkovic!
- Angular: Revert style adjustments - [#27361](https://github.com/storybookjs/storybook/pull/27361), thanks @valentinpalkovic!
- Angular: Support v18 - [#27237](https://github.com/storybookjs/storybook/pull/27237), thanks @valentinpalkovic!
- Controls: Fix date picker control validation and assignment - [#26695](https://github.com/storybookjs/storybook/pull/26695), thanks @leeovictor!
- Next.js: Avoid interfering with the svgr loader - [#27198](https://github.com/storybookjs/storybook/pull/27198), thanks @seanparmelee!
- Svelte: Support latest prerelease - [#27378](https://github.com/storybookjs/storybook/pull/27378), thanks @valentinpalkovic!
- Tags: Fix composition with older storybooks - [#27358](https://github.com/storybookjs/storybook/pull/27358), thanks @shilman!
- Telemetry: Add test packages - [#27226](https://github.com/storybookjs/storybook/pull/27226), thanks @shilman!
- Types: Fix type implementation for `CompatibleString` - [#27180](https://github.com/storybookjs/storybook/pull/27180), thanks @sni-J!
- Vite: Fix HMR issue for Storybook preview files - [#27256](https://github.com/storybookjs/storybook/pull/27256), thanks @valentinpalkovic!
- Vite: Fix asset warning by externalizing sb-common-assets font - [#27110](https://github.com/storybookjs/storybook/pull/27110), thanks @valentinpalkovic!
- Webpack5/Vite: Fix sourcemaps - [#27171](https://github.com/storybookjs/storybook/pull/27171), thanks @valentinpalkovic!

## 8.2.0-alpha.2

- Angular: Cleanup types - [#27189](https://github.com/storybookjs/storybook/pull/27189), thanks @valentinpalkovic!
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const defaultParameters = { config: {}, options: {} };
* Handle A11yContext events.
* Because the event are sent without manual check, we split calls
*/
const handleRequest = async (storyId: string, input: A11yParameters = defaultParameters) => {
const handleRequest = async (storyId: string, input: A11yParameters | null) => {
if (!input?.manual) {
await run(storyId, input);
await run(storyId, input ?? defaultParameters);
}
};

Expand Down
48 changes: 33 additions & 15 deletions code/builders/builder-manager/templates/template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,39 @@
<% } else if (favicon.endsWith('.ico')) { %>
<link rel="icon" type="image/x-icon" href="./<%= favicon %>" />
<% } %>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-bold.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="stylesheet" href="./sb-common-assets/fonts.css" />
<style>
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-regular.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-italic.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-bold.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-bold-italic.woff2') format('woff2');
}
</style>

<link href="./sb-manager/runtime.js" rel="modulepreload" />

Expand Down
62 changes: 33 additions & 29 deletions code/builders/builder-vite/input/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,39 @@
<title>Storybook</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-italic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-bold.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-bold-italic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="stylesheet" href="./sb-common-assets/fonts.css" />
<style>
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-regular.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-italic.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-bold.woff2') format('woff2');
}

@font-face {
font-family: 'Nunito Sans';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('./sb-common-assets/nunito-sans-bold-italic.woff2') format('woff2');
}
</style>

<script>
window.CONFIG_TYPE = '[CONFIG_TYPE HERE]';
Expand Down
7 changes: 5 additions & 2 deletions code/builders/builder-vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ export async function build(options: Options) {
outDir: options.outputDir,
emptyOutDir: false, // do not clean before running Vite build - Storybook has already added assets in there!
rollupOptions: {
// Do not try to bundle the storybook runtime, it is copied into the output dir after the build.
external: ['./sb-preview/runtime.js'],
external: [
// Do not try to bundle the Storybook runtime, it is copied into the output dir after the build.
'./sb-preview/runtime.js',
/\.\/sb-common-assets\/.*\.woff2/,
],
},
...(options.test
? {
Expand Down
Loading