-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Support Local TypeScript Plugins (outside of /plugins/ folder) #35032
Comments
In
it's pretty clear that Parcel won't compile anything outside of /plugins/ |
For the error with More details about the ESM incompatibility with Gatsby here: |
Hi @phil-lgr, Yarn Workspaces aren't supported yet . You can still use local plugins outside the plugins directory. |
Hi, thanks for the issue! Two things are at play here:
So with those things in mind this is a "won't fix" and I'll close this. I'll follow this up though with some updates to our current documentation to make this clearer. |
On my phone right now Well, I find it counter intuitive to introduce dozen of new deps around parcel and only support transpiling in the plugins folder.. but maybe I don’t have all the knowledge that you do I guess I’ll setup transpiling with tsc or webpack and then point Gatsby to it, in that regard v4 removes a possibility that we had in v3 but it’s fine, I’ll find a way. I’m also curious to know why this step is not being done with webpack (not sure about introducing many parcel deps for just this compile step, while we have already all the webpack deps used in gatsby). So yea, I disagree with the move but ultimately you know what’s best for the project, thanks for looking into it
while I used yarn workspaces in the repro, I don’t think it has something to do with that issue, I’m using a relative path and not a symlink so yea, the docs for local plugins will have to state that local plugins not in /plugins/ will need to be transpiled in commonjs as the parcel setup won’t do it outside of that particular folder |
Preliminary Checks
Description
It should be possible to have local plugins written in TypeScript in any folders.
Right now it only works if the plugin is located in
/plugins/
Related:
Reproduction Link
https://github.com/newrade/gatsby-repros
Steps to Reproduce
git clone https://github.com/newrade/gatsby-repros && cd gatsby-repros
yarn
cd packages/gatsby-site
yarn start
Expected Result
The plugin
gatsby-local-plugin
located in packages/gatsby-local-plugin, works as expected.Actual Result
Have the following error:
Environment
System: OS: macOS 12.1 CPU: (8) arm64 Apple M1 Shell: 3.2.57 - /bin/bash Binaries: Node: 16.14.0 - /var/folders/z3/1b10ld5s49n70q3n77_6_qch0000gn/T/yarn--1646265333774-0.9440956859973659/node Yarn: 1.22.11 - /var/folders/z3/1b10ld5s49n70q3n77_6_qch0000gn/T/yarn--1646265333774-0.9440956859973659/yarn npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm Languages: Python: 2.7.18 - /usr/bin/python Browsers: Chrome: 99.0.4844.51 Safari: 15.2
Config Flags
None.
The text was updated successfully, but these errors were encountered: