-
Notifications
You must be signed in to change notification settings - Fork 12
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
vite plugin / vite example project do not work #211
Comments
We use yarn for the monorepo, I imagine the issue is npm works differently? We do check that the vite plugin works in CI |
I can try yarn ... but doesn't it stand to reason that many people would be using |
In general all npm packages are consumable by any package manager. But within our repo, we have the monorepo setup using yarn.
So for your own repos, you can definitely consume app-config using npm.
…On Tue, Nov 8, 2022, at 10:05 AM, Andy Freidenfelds wrote:
I can try yarn ... but doesn't it stand to reason that many people would be using `npm` when depending on the vite plugin? if you are able to get it to work with `npm` then im good with considering this user/env-error 😄
—
Reply to this email directly, view it on GitHub <#211 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAK5D2RMIIVICNZLJZBLIRDWHKB4TANCNFSM6AAAAAARZUECMQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
ok ... thats what i tried, and when consuming the vite plugin, vite will not build and produces module export errors in json5 like the above stack. perhaps a recent release of json5 is breaking something here? can you confirm that the vite plugin is working within the last day or 2? |
UPDATE: i can get both the example project and my repo to work if i build vite and serve the output from |
I can give it a look over the weekend for sure. I havent paid close attention to vite release since first writing the plugin, so an issue with hot reloading or dev mode setup in general is possible (usually that's a separate flow in bundlers).
…On Tue, Nov 8, 2022, at 10:55 AM, Andy Freidenfelds wrote:
UPDATE: i can get both the example project and my repo to work if i build vite and serve the output from `/dist` ... however vite will not build/run in development mode (same error as above) with neither `npm` nor `yarn`
—
Reply to this email directly, view it on GitHub <#211 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAK5D2Q7JGKYDI5HJ5D3NULWHKHZBANCNFSM6AAAAAARZUECMQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
thanks! strange. for now i was able to work around it by running a build step to output app-config to |
Just for the record, I was able to repro this as described in a clean vite project. Will try and get a fix out today if I can find the issue. |
Yeah, this is somewhat trickier than I thought. The plugin system doesn't work consistently between dev and prod builds, and plugin API has changes a bit from v2 and v3. I would need more than the couple hours I have today to get this all sorted out. fwiw, I think it's basically caused by the "virtual module" concept, which breaks module names - the plugin uses names of modules ( Thanks for pointing this out! This is definitely the tricky bit when authoring a plugin for a build system I don't currently dogfood - API docs and stability tend to be fast moving and need consumers to point out breakages. |
no worries at all! thanks for looking into it. and yea things always move
at a pace faster than most can keep up! i just took a look at the sveltekit
docs for the first time in 6 months 🤣
…On Sun, Nov 13, 2022, 6:00 PM Joel Gallant ***@***.***> wrote:
Yeah, this is somewhat trickier than I thought. The plugin system doesn't
work consistently between dev and prod builds, and plugin API has changes a
bit from v2 and v3. I would need more than the couple hours I have today to
get this all sorted out.
fwiw, I think it's basically caused by the "virtual module" concept, which
breaks module names - the plugin uses names of modules (
appConigImportRegex) to determine if it should intercept loading.
Thanks for pointing this out! This is definitely the tricky bit when
authoring a plugin for a build system I don't currently dogfood - API docs
and stability tend to be fast moving and need consumers to point out
breakages.
—
Reply to this email directly, view it on GitHub
<#211 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI2YZ5ZUULFT4MCWQXZ3XTWIF6JBANCNFSM6AAAAAARZUECMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
When i install/use the vite plugin on a project I am unable to run the app. I also tried a fresh copy of the vite example in this repo and was met with the same error:
nodejs version: v16.18.1
Repo steps:
npm i
from/examples/vite-project
npm start
The text was updated successfully, but these errors were encountered: