fix(accordion,grid): inherit the root tsup config so vanilla-extract runs#292
fix(accordion,grid): inherit the root tsup config so vanilla-extract runs#292Yeom-JinHo wants to merge 1 commit into
Conversation
…runs accordion and grid were the last two styled packages whose tsup.config.ts did not inherit the root config, so the vanilla-extract esbuild plugin never ran for them. Their .css.ts bundled as ordinary TypeScript: importing dist threw at runtime, and dist/index.css was never emitted — even though both publishConfig blocks already advertise "./styles.css": "./dist/index.css". Consumers importing that subpath got ERR_MODULE_NOT_FOUND. Same defect #291 fixed for @sipe-team/tokens; these are the residual cases. publishConfig.exports and sideEffects were already declared correctly and are left untouched — they simply start being honoured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🦋 Changeset detectedLatest commit: 8aa8cc7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
진호님 이 PR은 머지할 필요가 없는 PR인 것 같습니다. 이미 #289 에서
를 동일하게 수정했고, .changeset/accordion-grid-compile-styles.md로 changeset도 이미 반영해두셨더라고요. 그래서 이 PR의 .changeset/fix-accordion-vanilla-extract.md, fix-grid-vanilla-extract.md도 같은 내용이라 머지되면 중복될 것 같습니다. (이 PR이 갈라진 뒤에 #289가 머지돼서 diff에 남아있는 것 같아요~! dev 기준으로는 두 파일 다 동일한 것으로 보입니다) |
Changes
@sipe-team/accordion과@sipe-team/grid는.css.ts(vanilla-extract) 스타일을 쓰는 17개 패키지 중, tsup 설정이 루트 설정을 상속하지 않는 마지막 2개였습니다. 그 결과 vanilla-extract esbuild 플러그인이 이 둘에서만 실행되지 않았고, 다음 문제가 있었습니다:Accordion.css.ts/Grid.css.ts가 일반 TypeScript로 번들되어,dist를 import하면 런타임에 예외가 발생합니다 (Styles were unable to be assigned to a file).dist/index.css가 생성되지 않아, 두 패키지의publishConfig가 이미 광고하고 있는"./styles.css": "./dist/index.css"진입점이 존재하지 않는 파일을 가리키고 있었습니다. 소비자의import '@sipe-team/accordion/styles.css'는ERR_MODULE_NOT_FOUND로 실패합니다.이는 #291이
@sipe-team/tokens에서 고친 것과 동일한 결함의 잔여 케이스입니다. (#291의 changeset은 "tokens가 유일하게 루트 설정을 상속하지 않았다"고 기술했으나, 실제로는 accordion·grid가 같은 상태로 남아 있었습니다.)변경 사항
packages/accordion/tsup.config.ts— 루트 설정 상속으로 교체 (다른 15개 패키지와 동일한import defaultConfig from '../../tsup.config'패턴)packages/grid/tsup.config.ts— 동일patch, gridpatch— 패키지별 분리)publishConfig.exports와sideEffects: ["**/*.css"]는 이미 올바르게 선언돼 있어 건드리지 않았습니다 — 이제서야 그 선언이 지켜집니다.Visuals
없음 (빌드 설정 변경).
빌드 산출물 before/after:
dist/index.cssdist/index.js의 VE 런타임 import@vanilla-extract/css잔존 (런타임 throw)Checklist