preset-vite icon indicating copy to clipboard operation
preset-vite copied to clipboard

Allow JSX Import Source to be overwritten

Open Interpause opened this issue 3 years ago • 7 comments

This pull request solves #46 by adding jsxImportSource to PreactPluginOptions. As a bonus, I changed prepublishOnly to prepare, which allows the package to be installed directly via Git and should not affect its behaviour when being published to npm.

Interpause avatar Apr 14 '22 14:04 Interpause

bump

Interpause avatar Jul 03 '22 01:07 Interpause

This PR has the right spirit, but does a whole lot more than just allowing jsxImportSource to be overwritten.

Is this referring to the additional 3 commits caused by fast forwarding the pull request to main?

Interpause avatar Sep 11 '22 00:09 Interpause

You need to rebase your changes. The diff is quite mangled.

rschristian avatar Sep 11 '22 08:09 rschristian

Should be fixed now.

Interpause avatar Sep 17 '22 04:09 Interpause

@Interpause the comment to leave prePublish in still stands 😅 we want this so when we use npm publish we are sure we can't forget to use the latest build

JoviDeCroock avatar Sep 17 '22 08:09 JoviDeCroock

@JoviDeCroock FWIW, prepare does run before a publish: https://docs.npmjs.com/cli/v8/using-npm/scripts#life-cycle-scripts

I would argue against prepare still though as there's no reason we need to run a build immediately after installing deps (which it does). That's just a nuisance, IMO.

Edit: I guess it facilitates installing from git, but meh. Do people do that often enough?

rschristian avatar Sep 17 '22 08:09 rschristian

Say, its been a while. Actually, I think the changes made to allow configuring jsxImportSource is quite minor, such that it probably would not be too much trouble for a maintainer to just include it in a commit. If so, would it be fine to close this PR?

Interpause avatar Oct 09 '22 12:10 Interpause

Could you please consider to merge the PR, as the changes had been cleaned up

o-alexandrov avatar Mar 05 '23 16:03 o-alexandrov