-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Question/Feature Request: How to replace the build step? #247
Comments
The build process is very tightly coupled into packemon, especially around folder structure, and how exports are mapped. I don't have plans to change this, as packemon is meant to be used as-is, since it does all the heavy lifting. You're probably better off forking packemon if you want this kind of custom functionality. |
I understand. Since packemon optionally supports I don't mind forking to customize, but before doing that, I would like to know if there's anything else that packemon depends on besides the folder structure. I mean something from babel or rollup. In other words, my idea was that I would replace only the transpilation phase, ensuring the folder structure is exactly what packemon expects. Would that be enough? What are other possible pitfalls? |
Packemon only supports swc, as it's a drop-in replacement for babel, both of which get fed into rollup. Both babel and rollup have custom plugins to achieve certain functionality.
This should be enough off the top of my head. Would need to dig through everything in |
Got it! I'll take a look and see if it's too much trouble or not. |
Oh, btw @milesj, are you interested in taking a look at the solution (in case I decide to implement it) to see if a PR makes sense? Or is that something you don't want to support due to the added complexity? |
Yeah, depends on the complexity. |
Hi there!
I want to replace the compilation step and do something similar to what
tshy
so I can rely on runningtsc
and have more control of the compilation.Since
tshy
does some of the work that packemon does, I was thinking of simply having a script to build each dialect. The script is simple and does the following:src
with appropriatemodule
src/node_modules/[PKG]
to supportimports
tsconfig.DIALECT.json
package.json
andsrc/node_modules
How hard would it be to customize packemon to call a script or a function I'm exporting to do that?
The text was updated successfully, but these errors were encountered: