Comments (3)
Start a new pull request in StackBlitz Codeflow.
from vite.
Scenario 2 - write
css.ligtningcss.target
in Vite config
It should not have been necessary to write
css.lightningcss.targets
, becausebuild.cssTarget
was already set in Vite config!
This may be a gray area, but it's probably working as intended since built.cssTarget
is a configuration for build.cssMinify
. As in the documentation, css.lightningcss.targets
should influence built.cssTarget
when build.cssMinify: "lightningcss"
, but not the other way around.
Other than this, I think there is still an issue on lightningcss side. The error happens when Vite uses default targets from
vite/packages/vite/src/node/plugins/css.ts
Lines 180 to 182 in 83355a6
vite/packages/vite/src/node/constants.ts
Lines 21 to 27 in 83355a6
and this can be reproduced on their playground with safari14
: lightningcss playground
from vite.
Whatever may happen, I am going to appreciate when the documentation becomes more clear about LightningCSS being incompatible to
build.cssTarget
today, with a note to redirect people tocss.lightningcss.targets
. It took me some time to discover this internal functioning when debugging.
@mrredtree I agree build.cssTarget
is confusing now. Like you said, as a short term solution, it make sense to update the documentation and jsdoc. Please feel free to send a PR if you like.
from vite.
Related Issues (20)
- service no longer running HOT 2
- Alias from an absolute path to package name on Windows HOT 12
- Treeshaking with compile-time constants HOT 3
- [Bug]: I use MUI and Storybook to create the new UI library, here I used light and dark theme to customize 'Button' component color, its theme is working properly in local dev environment. but not working on using the component from 'dist' directory after `npm run build`. HOT 2
- Potentially senstive data when filling out a bug report HOT 1
- Error while trying to bundle local workspace dependency HOT 2
- 目录中只要存在node_modules,无法正常运行 HOT 4
- 使用pnpm + package使用git地址时,出现加载路径不正确
- Image files can't keep the same folder structure as the the source directory when I set image files to entry files. HOT 1
- [BUG] Invalid substitution for placeholder "[name]" in "output.entryFileNames" on Windows HOT 2
- Inconsistent path resolution for references in HTML HOT 1
- Tree-Shaking: Everything disappears when moduleSideEffects:true HOT 2
- When I try to build the umd package using vite I get an error HOT 3
- Show a QR code with the address in the terminal when using `--host`. HOT 3
- Adding `react-ts-jest` template to the `create-vite` package
- Vite5: Inconsistent crossorigin attribute in css tags HOT 1
- dynamic import get preloaded despite `build.modulePreload = false` in Nuxt 3 HOT 4
- `@vitejs/plugin-legacy` injects scripts into html files without any JS in `mpa` mode HOT 1
- Compiler is broken and generates code that behaves differently than running `vite` in dev server mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite.