From 5938936d9d7471d1ab03e0dbe1ee9eba23f47634 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 17 Mar 2023 08:44:10 -0400 Subject: [PATCH] Add option for the old behavior --- .changeset/odd-vans-repair.md | 21 +++++ README.md | 38 +++++++++ .../src/rollup-plugin.js | 25 +++++- packages/test-app/package.json | 1 + .../tests/integration/loose-mode-test.ts | 10 +++ packages/test-app/types/index.d.ts | 6 +- .../test-rollup-addon-split-gts/.eslintignore | 1 + .../test-rollup-addon-split-gts/.eslintrc.cjs | 9 ++ .../test-rollup-addon-split-gts/.gitignore | 1 + .../.prettierignore | 1 + .../.prettierrc.cjs | 6 ++ .../addon-main.cjs | 5 ++ .../babel.config.json | 15 ++++ .../test-rollup-addon-split-gts/package.json | 83 +++++++++++++++++++ .../rollup.config.mjs | 28 +++++++ .../src/components/ts-split-class-demo.gts | 15 ++++ .../src/components/ts-split-demo.gts | 5 ++ .../src/glint-registry.ts | 6 ++ .../test-rollup-addon-split-gts/src/index.ts | 2 + .../test-rollup-addon-split-gts/tsconfig.json | 7 ++ .../unpublished-development-types/index.d.ts | 2 + pnpm-lock.yaml | 63 +++++++++++++- 22 files changed, 343 insertions(+), 7 deletions(-) create mode 100644 .changeset/odd-vans-repair.md create mode 100644 packages/test-rollup-addon-split-gts/.eslintignore create mode 100644 packages/test-rollup-addon-split-gts/.eslintrc.cjs create mode 100644 packages/test-rollup-addon-split-gts/.gitignore create mode 100644 packages/test-rollup-addon-split-gts/.prettierignore create mode 100644 packages/test-rollup-addon-split-gts/.prettierrc.cjs create mode 100644 packages/test-rollup-addon-split-gts/addon-main.cjs create mode 100644 packages/test-rollup-addon-split-gts/babel.config.json create mode 100644 packages/test-rollup-addon-split-gts/package.json create mode 100644 packages/test-rollup-addon-split-gts/rollup.config.mjs create mode 100644 packages/test-rollup-addon-split-gts/src/components/ts-split-class-demo.gts create mode 100644 packages/test-rollup-addon-split-gts/src/components/ts-split-demo.gts create mode 100644 packages/test-rollup-addon-split-gts/src/glint-registry.ts create mode 100644 packages/test-rollup-addon-split-gts/src/index.ts create mode 100644 packages/test-rollup-addon-split-gts/tsconfig.json create mode 100644 packages/test-rollup-addon-split-gts/unpublished-development-types/index.d.ts diff --git a/.changeset/odd-vans-repair.md b/.changeset/odd-vans-repair.md new file mode 100644 index 0000000..dd53be8 --- /dev/null +++ b/.changeset/odd-vans-repair.md @@ -0,0 +1,21 @@ +--- +"rollup-plugin-glimmer-template-tag": minor +--- + +Add option to the rollup plugin so that folks can choose to separately due to the two-step transform. + +In 0.2.0, it became possible to _only_ use the rollup plugin for the entirety of the transform, whereas in 0.1.0, a babel plugin was needed as well. + +In this version, you may go back to the 0.1.0 style configuration via: + +```js +// rollup.config.mjs +export default { + output: addon.output(), + plugins: [ + // ... + glimmerTemplateTag({ preprocessOnly: true }), + // ... + ], +}; +``` diff --git a/README.md b/README.md index f6b2f83..5ed668a 100644 --- a/README.md +++ b/README.md @@ -129,3 +129,41 @@ Without setting `transpileOnly: true` (using the default or explicitly setting t This exposes internal information about the `