Skip to content

build(many): remove commonjs build - #2683

Open
joyenjoyer wants to merge 2 commits into
chore-remove-dead-babel-pluginsfrom
INSTUI-5148-remove-common-js-v2
Open

build(many): remove commonjs build#2683
joyenjoyer wants to merge 2 commits into
chore-remove-dead-babel-pluginsfrom
INSTUI-5148-remove-common-js-v2

Conversation

@joyenjoyer

Copy link
Copy Markdown
Contributor

Summary

  • Drop the --modules cjs build path from ui-scripts build (babel.ts, specify-commonjs-format.ts) and switch generate-all-tokens to import from es/ instead of require()-ing lib/
  • Ship every @instructure/* package ESM-only: remove the lib/CommonJS output, main field, and require export conditions; add type: module; rename each package's babel.config.js to babel.config.cjs

Stacked on #2682 (dead babel plugin removal) — base branch will move to master once that merges.

Test Plan

  • No manual verification needed; covered by pnpm run bootstrap, tsc -b, oxlint, and vitest.

Fixes INSTUI-5148

🤖 Generated with Claude Code

Remove the --modules flag and the cjs branch from `ui-scripts build`, along
with specify-commonjs-format.ts (which stamped lib/package.json with
{"type":"commonjs"}). Only the es build remains.

Switch generate-all-tokens to dynamic import() of the es output instead of
require()-ing the lib output.
Ship every InstUI package ESM-only: drop the `lib`/CommonJS build output,
`main` field, and `require` export conditions in favor of `type: module` and
the existing `es` output. Rename each package's babel.config.js to
babel.config.cjs (needed once the package itself is type: module).
@joyenjoyer joyenjoyer self-assigned this Aug 10, 2026
@joyenjoyer
joyenjoyer requested a review from balzss August 10, 2026 13:08
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2683/

Built to branch gh-pages at 2026-08-10 13:12 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Visual regression report

⚠️ Changes detected.

Status Count
Unchanged 0
Changed 1
New 96
Removed 32

📊 View full report

Diff images (33)

alert.png — baseline no longer produced

avatar.png — baseline no longer produced

badge.png — baseline no longer produced

billboard.png — baseline no longer produced

breadcrumb.png — baseline no longer produced

button-and-derivatives.png — baseline no longer produced

byline.png — baseline no longer produced

calendar.png — baseline no longer produced

checkbox.png — baseline no longer produced

checkboxgroup.png — baseline no longer produced

colorpicker.png — baseline no longer produced

contextview.png — baseline no longer produced

custom-and-lucide-icons.png — baseline no longer produced

dateinput-dateinput2.png — baseline no longer produced

datetimeinput.png — baseline no longer produced

diff-demo.png — 6324 pixels differ

drilldown.png — baseline no longer produced

filedrop.png — baseline no longer produced

form-errors.png — baseline no longer produced

heading.png — baseline no longer produced

img.png — baseline no longer produced

link.png — baseline no longer produced

menu.png — baseline no longer produced

metric-pill-tag-timeselect-text.png — baseline no longer produced

options.png — baseline no longer produced

pagination.png — baseline no longer produced

progressbar.png — baseline no longer produced

select-simpleselect.png — baseline no longer produced

table.png — baseline no longer produced

tabs.png — baseline no longer produced

tooltip.png — baseline no longer produced

treebrowser.png — baseline no longer produced

view.png — baseline no longer produced

Baselines come from the visual-baselines branch. They refresh on every merge to master.

Sign up for free to 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.

1 participant