64231c73f1
Configuration changes taken from the vite starter (react-ts). From the vite docs (https://github.com/vitejs/vite-plugin-react-swc?tab=readme-ov-file#consistent-components-exports) > For React refresh to work correctly, your file should only export React components. > > If an incompatible change in exports is found, the module will be invalidated. > To make it easier to export simple constants alongside your component the module > is only invalidated when their value changes. While we're not currently using vite for our main apps, it would be worthwhile to write code in a way that a future migration to it is painless if needed. About the what and the why, the Gatsby docs are illuminating: https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works Some other refs: - https://github.com/ArnaudBarre/eslint-plugin-react-refresh - https://github.com/vitejs/vite/discussions/4577#discussioncomment-1161007 - https://github.com/vitejs/vite-plugin-react/issues/34 |
||
---|---|---|
.. | ||
.eslintrc.js | ||
eslintrc-base.js | ||
eslintrc-next.js | ||
eslintrc-react.js | ||
eslintrc-vite.js | ||
package.json | ||
README.md | ||
tsconfig-typecheck.json | ||
tsconfig-vite.json | ||
tsconfig-vite.node.json | ||
tsconfig.json |
@/build-config
Build time configuration files. This can be thought of as a devDependency
that
exports various config files that our packages use at build time.
Packaging
This is not a TypeScript package, nor is it linted. It is not meant to be transpiled, it just exports static files that can be included verbatim.
Debugging
Too see what tsc is seeing (say when it is trying to type-check @/utils
), use
yarn workspace @/utils tsc --showConfig
.
Similarly, to verify what ESLint is trying to do, use
yarn workspace @/utils eslint --debug .
If the issue is in VSCode, open the output window of the corresponding plugin, it might be telling us what's going wrong there. In particular, when changing the settings here, you might need to "Developer: Reload Window" in VSCode to get it to pick up the changes.