refactor: use rollup to compile transform mode#713
Conversation
bfc8432 to
045baaf
Compare
More templates
@ice/create-pkg
ice-npm-utils
@ice/pkg
@ice/pkg-plugin-jsx-plus
@ice/pkg-plugin-mf
commit: |
045baaf to
ecc482d
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors @ice/pkg transform mode to compile via Rollup (preserveModules) instead of the previous custom plugin-container pipeline, and introduces transform.entryRoot (and pkgs[].entryRoot) to control transform output path mapping. It also updates docs and adds new integration/unit tests to cover copying non-script assets, multi-entry behavior, watch incremental updates, and the new entryRoot semantics.
Changes:
- Refactor transform task implementation to use Rollup
rollup()+preserveModules, plus shared Rollup output/warn helpers. - Add
entryRootto transform config (global + per-pkg) and document the behavior. - Add/adjust integration tests and snapshots for new transform output structure and watch behavior.
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/reference/config.md | Documents transform.entryRoot and updates examples/formatting. |
| website/docs/guide/abilities.md | Explains transform multi-entry scope and entryRoot output mapping. |
| packages/pkg/src/tasks/transform.ts | Replaces per-file plugin container transform with Rollup preserveModules + incremental copy/delete logic. |
| packages/pkg/src/helpers/getTaskIO.ts | Adds common-ancestor and entryRoot resolution helpers. |
| packages/pkg/src/core/init.ts | Resolves/validates entryRoot for transform tasks (supports pkg override). |
| packages/pkg/src/types.ts | Adds entryRoot to user/task config types. |
| packages/pkg/src/engine/rollup/output.ts | Introduces a shared Rollup output → OutputFile normalization helper. |
| packages/pkg/src/engine/rollup/warn.ts | Adds filtered Rollup warning wrapper (ignores empty chunk warnings). |
| packages/pkg/src/engine/rollup/build.ts | Uses new output normalization helper. |
| packages/pkg/src/helpers/pluginContainer.ts | Removes legacy plugin container implementation. |
| tests/helpers/watch.ts | Adds a test helper to run/watch ice-pkg start and assert incremental outputs. |
| tests/integration/transform/* | Adds new transform integration fixture, configs, tests, and snapshots. |
| packages/pkg/tests/* | Adds unit coverage for entryRoot computation and initTask entryRoot behavior. |
| tests/integration//snapshots/.snap | Updates expected compiled output snapshots to match Rollup preserveModules output. |
| pnpm-lock.yaml | Adds the new integration test workspace package. |
| .changeset/four-meals-cough.md | Declares a major version bump for the transform-mode refactor. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ecc482d to
3e6534b
Compare
3e6534b to
68a8331
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 42 out of 44 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.