-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
WIP: Wip vite as suite devserver #17152
base: develop
Are you sure you want to change the base?
Conversation
77c9471
to
db851bd
Compare
@@ -0,0 +1,60 @@ | |||
<!doctype html> |
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.
this should be unified with the webpack's index.html file, I think thats possible just some variables willneed to be replaced coz it uses webpack's template literals.
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.
Sounds doable to make a script to replace or strip the webpack syntax → make it digestible by Vite.
Question is, when should this script fire?
Quick search: vite might have a hook that allows you to modify the static assets on-the-fly, which would be better than running it manually after each index.html
change (although that'd be fine too, this file is not modified very often 🙂 )
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.
Yeah I know it is possible, I have it in one of the commits. Though, I have troubles moving the whole vite config to suite-buiild
package for some reason. I tried many things already...
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.
Note to me: don't forget to server the static/index.html file here, not this artificial one.
ab227b5
to
91c45c5
Compare
🚀 Expo preview is ready!
|
22d9424
to
2d7ff96
Compare
@@ -7,6 +7,7 @@ | |||
"type-check:watch": "yarn type-check -- --watch", | |||
"lint:styles": "npx stylelint './src/**/*{.ts,.tsx}' --cache --config ../../.stylelintrc", | |||
"dev": "yarn rimraf ./build && yarn workspace @trezor/suite-build run dev:web", | |||
"dev:vite": "yarn rimraf ./build && vite", |
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.
thius should be likely in @trezor/suite-build
not here
22a7790
to
bc6dd74
Compare
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
ea4d44f
to
0708451
Compare
Tested Webpack: dev Desktop, dev Desktop, linux Desktop build. |
yup, see that too. Server runs, but throws errors. Looking into it. Probably some yarn deduping caused this... |
Added what webpack advised us to do. It is no longer with warning. I hope that's correct. |
f590d21
to
6a4cae9
Compare
|
||
// Use require instead of import for TypeScript files | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { assetPrefix, project } = require('../suite-build/utils/env'); |
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.
damn it, I had to do this... Otherviews, the linter was screeming and with @trezor/suite-build
would allow the vite config to compile, that's mess, but this wworks
23bf350
to
ab567da
Compare
ab567da
to
d75d4da
Compare
@SocketSecurity ignore npm/vite-plugin-wasm@3.4.1 |
…ontains 'react' structure
…" without template variables in the paths
acc87c3
to
c536099
Compare
c536099
to
37a4d0f
Compare
TODO
suite-build
Description
Related Issue
Resolve
Screenshots: