A repository to provide the Vite team with a small project to demonstrate the bug.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
- Created project using
create-vite
and thereact
template. - Downgraded
vite
to 3.2.2 and@vitejs/plugin-react
to 2.2.0. - Installed
less
2.7.3,less-plugin-npm-import
2.1.0 andsemantic-ui-less
2.5.0. - Added
ThirdParty
directory with Lato fonts, addedSemanticTheme
directory with customisation and addedplugins
directory to make semantic UI less work with the customisation. - Renamed App.css to App.less.
- Added semantic-ui-less imports to App.less.
- Added some semantic-ui-less icon classes to App.jsx as a test case to see if the fonts are being rendered.
npm install --save-dev vite@3.2.3
npm clean-install
npm run dev
Run the following to see the error messages:
npm install --save-dev vite@3.2.3
npm clean-install
npm run build
The fonts icons, brand-icons and outline-icons does not appear in dist/assets and the icons in App.jsx <i class="icon ..."></i>
will not render because it is missing the font.
However the fonts in ThirdParty will be bundled because it hard codes the font path and name e.g. url('./LatoLatin-Regular.ttf')
.
Any vite version higher than 3.2.2 will exhibit the bug including the latest 4.5.0.