Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(common): clean up dev vite configs #304

Merged
merged 5 commits into from
Oct 31, 2023
Merged

Conversation

eunjae-lee
Copy link
Contributor

What?

In #264, we added dev-template.mjs script to create a dev version of vite configs for all templates which include aliases to the field plugin library.

It helped us develop templates without having to re-build the library when we need to update both the template and the library at the same time.

However this applied to only dev command to the templates. Thinking of test command, this needed some change. Now once you run yarn install, the postinstall command will automatically generate the dev version of vite configs. And dev:xxx and test:xxx commands will use these configs.

@vercel
Copy link

vercel bot commented Oct 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 3:24pm

@eunjae-lee
Copy link
Contributor Author

eunjae-lee commented Oct 30, 2023

@BibiSebi
Copy link
Contributor

Just for me to double-check, so now in case you run yarn install in the root, this will prepare everything. If you make a change afterward inside the field plugin, the templates will still be able to pick up the change.

@eunjae-lee
Copy link
Contributor Author

Just for me to double-check, so now in case you run yarn install in the root, this will prepare everything. If you make a change afterward inside the field plugin, the templates will still be able to pick up the change.

yes! that postinstall generates the dev vite configs right automatically after yarn install. And then if you run yarn dev:xxx at the root level, it uses the dev config instead of the real one in the template. So it picks up the change from the library directly without having to bundle the library 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants