Uh oh!
There was an error while loading. Please reload this page.
Stop publishing the Storybook-only Sass entry point - #2446
Merged
Conversation
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 detectedLatest commit: 2e43f89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
filesalready excludessrc/index.scssbecause it is a Storybook-only entry point.src/index-with-dependencies.scssis 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-librarythrough../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
npm pack --dry-run. The listed file count should be 360, and nosrc/index-with-dependencies.scssorsrc/index.scssshould appear.npm startand confirm Storybook boots and looks normal — fonts, WordPress block styles, and component pages all as before.filesonly affects the published tarball, so Storybook reads this file from the working tree either way.src/index-with-dependencies.scssis published, and cannot work for a consumer #2445