-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
webapp(cli): migrate to vite
#772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, many kudos to you!! 🎉 Thank you very much for the effort.
A few comments inline. I also noticed that the build failed with:
> vite build --no-clean
file:///usr/src/app/node_modules/vite/dist/node/cli.js:442
throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
^
CACError: Unknown option `--clean`
at Command.checkUnknownOptions (file:///usr/src/app/node_modules/vite/dist/node/cli.js:442:17)
at CAC.runMatchedCommand (file:///usr/src/app/node_modules/vite/dist/node/cli.js:640:13)
at CAC.parse (file:///usr/src/app/node_modules/vite/dist/node/cli.js:579:12)
at file:///usr/src/app/node_modules/vite/dist/node/cli.js:906:5
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.17.0
The command '/bin/sh -c npm run build -- --no-clean' returned a non-zero code: 1
Service 'www' failed to build : Build failed
a2efc9b
to
02894c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the last commit should be squashed into 97f1fd0, otherwise seems good to go.
Before deploying, I tried to fire up the dev environment, and with this PR applied, the |
file: docker-compose.dev.yml Old
New
Vite uses |
The webapp container is still not listening on port 8080. I tried adding |
Vite is faster than the old `vue-cli`. For new `vue` projects it is the default build system. https://vitejs.dev/ --- docker: change env vars to `vite` schema * Replace prefix `VUE_` by `VITE_`. * Update option to not delete output dir. * Remove unused environment variables
This is a workaround. `vuelidate` should be updated to newer mayor.
You found the reason and solution 👍 . I think you forgot the npm run dev -- --host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you very much!
- CODESANDBOX_SSE=1 # so that ws: protocol ends up as auto: in node_modules/@vue/cli-service/lib/commands/serve.js | ||
- CYPRESS_CACHE_FOLDER=/tmp/.cache # https://github.com/cypress-io/cypress/issues/1281#issuecomment-404823001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
I found an issue with CSP #788 |
Finally a working vite system :)
Reference
solves #771