Allow typescript transpilation not to match rollup file option

Open
#1,941 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by comparing rollup.config.csp.ts and rollup.config.ts, then reproduce the TypeScript plugin migration failure from maplibre/maplibre-gl-js PR #6621. Trace the plugin's handling of the Rollup output and tsconfig settings; done means both builds pass with their different output directories without changing the existing configuration files.

Written by the indexing model from the issue text.

Description

  • Rollup Plugin Name: @rollup/plugin-typescript
  • Rollup Plugin Version: migration from 12.1.4 to 12.3.0
Feature Use Case

We have a "complicate" rollup setup where we use rollup in phase one to output js and then use that output in step 2 to link code inside a worker.
We also have a csp version that is simpler and doesn't need all this logic and output straight to dist folder.
Code can be found here:
https://github.com/maplibre/maplibre-gl-js/blob/c7ffb7469fb17e011733fc5c290dce21e544cdc9/rollup.config.csp.ts
https://github.com/maplibre/maplibre-gl-js/blob/c7ffb7469fb17e011733fc5c290dce21e544cdc9/rollup.config.ts

This means that the two builds output to different folders, so I can't confiture a tsconfig to satisfy both.
I know I can create a new tsconfig to inherit from the default one and then use it, but it's less than ideal.

Feature Proposal

If there's a way to make the build pass like it did for 12.1.x without changing any of the configuration files, that'll be great.
But otherwise, if I could specify something in the rollup config so that it doesn't need to match the tsconfig that would be great.

If there's anything I can do to solve this easily, do let me know.
Build is failing here:

Dominant language
JavaScript
Stars
3.8k
Forks
635
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rollup/plugins

All issues in rollup/plugins

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.