0

I use ParcelJS to bundle my JavaScript code. I want to modify an existing plugin (say the Elm plugin) to convert some special files on the fly with our own proprietary transpiler to JavaScript.

Therefor I cannot install the plugin from teh npmjs repo via Yarn into the node_modules folder. I have the relevant plugin files (asset.js, index.js, package.json) in a local directory myplugin. How do I tell ParcelJS to use them?

halloleo
  • 9,216
  • 13
  • 64
  • 122

1 Answers1

0

If you have your plugin with a package.json in the directory myplugin you can add add it (as a dev dependency) with the following command:

yarn add ./myplugin --dev

Yarn will copy the plugin to the node_modules folder. When you have changed stuff in your plugin folder increase the version number in the plugin's package.json and run yarn upgrade.

halloleo
  • 9,216
  • 13
  • 64
  • 122