Plugin development is a bit difficult locally
See original GitHub issueChoose one: is this a ๐ bug report or ๐ feature request?
๐ Support npm link
ed plugins!
๐ Configuration (.babelrc, package.json, cli command)
The configuration isnโt important here, but because I canโt link a plugin, I canโt test to see if it works before submitting my package to npm.
๐ค Expected Behavior
Well, by the description of the problem, it should be supported, I would think!
๐ฏ Current Behavior
It currently does not support linked plugins.
๐ Possible Solution
I havenโt enough information on how npm link
works, but it would be great to learn, since Iโm trying to design something similar in nature to parcel (not a js packager).
๐ฆ Context
I am trying to accomplish creating a plugin locally so that I can start to help parcel support different sorts of file types.
๐ป Code Sample
This is not necessary.
๐ Your Environment
Windows 10, latest node, latest npm. I do not use yarn personally.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (5 by maintainers)
In your sandbox project, create 2 scripts to manually call Parceljs with your plugin:
Run as
node start.js
/node build.js
.Iโve added these scripts to my
package.json
:PS: Iโm on Windows but I have bash commands in my PATH (itโs an option when you install
msysgit
).PPS: never run
yarn clean
- alwaysyarn run clean
I had the same problem - there are different ways to handle that (they could be documented on Parcel website):
npm link
create a test parceljs project,
install your local plugin (this copies your plugin in your test project):
use
npm link
to replace the installed copy by a symlink to your plugin sources:Now you can edit your plugin sources.