@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:
package = "./node_modules/netlify-plugin-jest"
extraLogging = true
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.