The problem with having the file:.. link in the demo/package.json. yarn under the hood copies the files into the node_modules and new changes are not reflected. npm creates a symlink. This is so we can still use the file:.. link. Another way to do this is to split this repo to use the "monorepo workspace" style that these tools offer.
Plugin returns an array of plugins
I think this is a cleaner API, as we could have multiple plugins that a user could opt in based on the options that they give us. This would pave way for anything we may need to add such as HMR in a vanilla cljs project.
Standardised demo package scripts
When you create a new project using npm create vite@latest they give you the following scripts:
I made the following changes:
remove
yarn
in favour ofnpm
The problem with having the
file:..
link in thedemo/package.json
.yarn
under the hood copies the files into thenode_modules
and new changes are not reflected.npm
creates a symlink. This is so we can still use thefile:..
link. Another way to do this is to split this repo to use the "monorepo workspace" style that these tools offer.Plugin returns an array of plugins
I think this is a cleaner API, as we could have multiple plugins that a user could opt in based on the options that they give us. This would pave way for anything we may need to add such as HMR in a vanilla cljs project.
Standardised demo package scripts
When you create a new project using
npm create vite@latest
they give you the following scripts:I followed their approach for our demos.