Skip to content

Stop publishing the Storybook-only Sass entry point - #2446

Merged
spaceninja merged 1 commit into
mainfrom
exclude-storybook-sass-entry
Aug 24, 2026
Merged

Stop publishing the Storybook-only Sass entry point#2446
spaceninja merged 1 commit into
mainfrom
exclude-storybook-sass-entry

Conversation

@spaceninja

Copy link
Copy Markdown
Member

Overview

files already excludes src/index.scss because it is a Storybook-only entry point. src/index-with-dependencies.scss is the other one, and it was shipping — the exclusion was one file short of its own intent rather than making a distinction between the two.

Nobody can have been depending on it, which is what makes this a patch rather than a break. Compiling it from an installed tarball fails immediately: it loads @wordpress/block-library through ../node_modules/, which resolves inside our own package directory, and that is a devDependency we never install for a consumer. Behind that failure are two more — @use './index' points at the file we already exclude, and the font directory is configured as /src/assets/fonts, a root-absolute path that only resolves while Vite is serving Storybook.

Screenshots

Testing

  • Run npm pack --dry-run. The listed file count should be 360, and no src/index-with-dependencies.scss or src/index.scss should appear.
  • Run npm start and confirm Storybook boots and looks normal — fonts, WordPress block styles, and component pages all as before. files only affects the published tarball, so Storybook reads this file from the working tree either way.

files already excludes src/index.scss for being Storybook-only; its
sibling src/index-with-dependencies.scss was shipping. No consumer can
have used it: it loads @wordpress/block-library through ../node_modules/,
which resolves inside our own package directory, and that is a
devDependency. Behind that it also loads ./index, which files excludes,
and hard-codes a root-absolute font directory.
Fixes#2445
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2e43f89

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@cloudfour/patternsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlifyBot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for cloudfour-patterns ready!

NameLink
🔨 Latest commit2e43f89
🔍 Latest deploy loghttps://app.netlify.com/projects/cloudfour-patterns/deploys/6a8c79e09cc8fc0007f0b81c
😎 Deploy Previewhttps://deploy-preview-2446--cloudfour-patterns.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@spaceninja
spaceninja merged commit 913c466 into mainAug 24, 2026
8 checks passed
@spaceninja
spaceninja deleted the exclude-storybook-sass-entry branch August 24, 2026 17:07
@github-actionsgithub-actionsBot mentioned this pull request Aug 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src/index-with-dependencies.scss is published, and cannot work for a consumer

1 participant

@spaceninja