We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue is to keep track of various considerations, will be closed once concluded with documentations
(WIP)
import.meta.env
VITE_
ESM
shadn use components.json alias
components.json
tsconfig paths alias is not sufficient and we use nodejs subpath imports
tsconfig paths alias
imports
package.json
#
to support IDE, we need array with explicit extension. Note order matters so IDE can process accordingly
"imports": { "#*": ["./src/*", "./src/*.tsx"] },
This is expected for auto import to work.
includePackageJsonAutoImports is to trade off performance for full search on paths for all internal packages, so as to support wildcard import
includePackageJsonAutoImports
importModuleSpecifierEnding is to avoid automatically adding .js extension, , although in practice we find it a bit fuzzy
importModuleSpecifierEnding
.js
"typescript.preferences.includePackageJsonAutoImports": "on", "typescript.preferences.importModuleSpecifierEnding": "minimal",
As we try to be agnostic and align common convention
we support .env
.env
avoid the vite convention of import.meta.env and stick with process.env
to achieve this, we have
process.env
we prefer to name space env variables, and for now we use canonical util config at packages/domain/src/config.ts
packages/domain/src/config.ts
avoid loading environment directly at components / libs (e.g. process.env) and always prefer injecting config
Huly®: DAPPK-58
support project root config https://vite.dev/config/#configuring-vite
vite config need to be customize for dom based testing at storybook / ui-react packages
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue is to keep track of various considerations, will be closed once concluded with documentations
(WIP)
Background
import.meta.env
and expect env variables prefixed e.g.VITE_
Our take
ESM
path alias
shadn use
components.json
aliastsconfig paths alias
is not sufficient and we use nodejs subpath importsimports
atpackage.json
for the#
aliasto support IDE, we need array with explicit extension. Note order matters so IDE can process accordingly
IDE config
This is expected for auto import to work.
includePackageJsonAutoImports
is to trade off performance for full search on paths for all internal packages, so as to support wildcard importimportModuleSpecifierEnding
is to avoid automatically adding.js
extension, , although in practice we find it a bit fuzzyEnv config
As we try to be agnostic and align common convention
we support
.env
avoid the vite convention of
import.meta.env
and stick with process.envto achieve this, we have
process.env
https://vite.dev/config/we prefer to name space env variables, and for now we use canonical util config at
packages/domain/src/config.ts
avoid loading environment directly at components / libs (e.g. process.env) and always prefer injecting config
Huly®: DAPPK-58
Vite config
support project root config
https://vite.dev/config/#configuring-vite
vite config need to be customize for dom based testing at storybook / ui-react packages
The text was updated successfully, but these errors were encountered: