Locally, it seems/seemed to be to use a relative path to the plugin from a linked netlify deployment like this netlify.toml:
[[plugins]]
package = "..\\netlify-plugins\\netlify-plugin-jest\\"
[plugins.inputs]
skipTests = false
[[plugins]]
package = "@netlify/plugin-local-install-core"
Thanks.
Hi @moop-moop,
Thanks for reaching out.
Yes, this is the recommended approach.
@ehmicky I found this appraoch useful too, when I required an “official” build:
Testing plugin on an actual Netlify Build/Deploy without a released npm
The plugin can be tested without using an actual released npm package by doing the following:
- Figure out the branch/tag/commit etc of the plugin to test, and install it as a package in the Netlify site you will use for testing:
npm install UWHealth/netlify-plugin-jest#<branch/tag/commit>
- Change the Netlify site’s toml configuration:
[[plugins]]
package = "./node_modules/netlify-plugin-jest"
[plugins.inputs]
extraLogging = true
[[plugins]]
package = "@netlify/plugin-local-install-core"
- Make sure to clear the build/deploy cache when you build/redeploy the testing site on Netlify. This will pull down a clean copy of the plugin code from the branch/tag/commit specified in the package.json after the
npm install
.
- Uninstall the Github sourced npm afterwards if the site is to be used for production purposes.
1 Like
Thanks for sharing @moop-moop!