Skip to content

Conversation

@oriSomething
Copy link

@oriSomething oriSomething commented Nov 28, 2020

I've listed as a minor instead of patch (Because TS isn't semver). Event though in rare cases it might be a major change.
I've tested it on a personal project that uses TS 4.1.

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2020

🦋 Changeset detected

Latest commit: 3c6941f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
microbundle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vladmiller
Copy link

vladmiller commented Dec 10, 2020

With yarn, I am forcing ^4.1 version using resolution in package.json

"resolutions": {
  "microbundle/typescript": "^4.1"
},

However, it throws an error when using react-jsx option.

rpt2: options error TS5089: Option 'jsxFactory' cannot be specified when option 'jsx' is 'react-jsx'.

Here is where jsxFactory set by minibundle: https://github.com/developit/microbundle/blob/master/src/index.js#L498-L503

The workaround is to set jsxFactory inside of tsconfig.json; however, maybe microbundle should try to detect settings from tsconfig.json and don't try to set jsxFactory if jsx is set to react-jsx?

@rschristian
Copy link
Collaborator

rschristian commented Dec 16, 2020

Here is where jsxFactory set by minibundle: https://github.com/developit/microbundle/blob/master/src/index.js#L498-L503

The workaround is to set jsxFactory inside of tsconfig.json; however, maybe microbundle should try to detect settings from tsconfig.json and don't try to set jsxFactory if jsx is set to react-jsx?

Not quite.

Microbundle passes a set of defaults to rollup-plugin-typescript2, but the user's tsconfig overrides with a deep merge (with the small exception of module and target -- those Microbundle does enforce).

rpt2 has not been updated for TS 4.1, so until it does, you can't user newer features.

Edit: This was a bad quick assumption on my part. rpt2 was doing just fine.

@developit
Copy link
Owner

I think this may be superceded by #741.

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.

4 participants