Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript plugin doesn't emit latest assets on rollup when watchMode is false #1354

Closed
gbaron opened this issue Nov 24, 2022 · 1 comment · Fixed by #1356
Closed

Typescript plugin doesn't emit latest assets on rollup when watchMode is false #1354

gbaron opened this issue Nov 24, 2022 · 1 comment · Fixed by #1356

Comments

@gbaron
Copy link
Contributor

gbaron commented Nov 24, 2022

  • Rollup Plugin Name: @rollup/plugin-typescript
  • Rollup Plugin Version: 9.0.2
  • Rollup Version: 3.4.0
  • Operating System (or Browser): Mac OS
  • Node Version: 16.17.0
  • Link to reproduction (⚠️ read below): https://github.com/gbaron/rollup-ts-issue

Expected Behavior

The emitted code should match the typescript compiled result of the source file

Actual Behavior

The emitted code doesn't match the source.

Additional Information

Scenario:

  1. Initialize @rollup/plugin-typescript once.
  2. Use the plugin in a rollup configuration.
  3. Invoke rollup.rollup(...) on 'x.ts' and then bundle.generate to generate JS code.
  4. Mutate `x.ts'
  5. Invoke rollup.rollup(...) on 'x.ts' and then bundle.generate again.

Result: The same JS code will be generated after steps 3 and 5.
Expected: After step 5, the JS code should be different and match the updated x.ts.

Note: Although watchMode is false. The expectation is that invoking rollup.rollup(...) will always generate up-to-date results.

@gbaron gbaron changed the title Typescript plugin doesn't emit latest assets on rollup with watchMode is false Typescript plugin doesn't emit latest assets on rollup when watchMode is false Nov 24, 2022
@gbaron
Copy link
Contributor Author

gbaron commented Nov 27, 2022

@shellscape I've made a minor PR to fix this issue.

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 a pull request may close this issue.

1 participant