Comments (5)
@predaytor My mistake. A typo cause it. I'll release a new version to fix it.
from vite-plugin-stylex.
This issue may same as #14
from vite-plugin-stylex.
Try it now. v0.5.1
has been released.
from vite-plugin-stylex.
Unfortunately, the custom media does not work.. same errors. But can confirm that other LightningCSS related issues have been resolved, very thanks!
Here's a new Stackblitz based on an remix-demo example from the repo.
❯ pnpm dev
> remix-demo@ dev /home/predaytor/remix-stylex
> remix vite:dev
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
1:37:24 PM [vite] Pre-transform error: Custom media query --mx-1 is not defined
1:37:24 PM [vite] Error when evaluating SSR module /app/Card.tsx: failed to import "vite-plugin:stylex.css"
|- SyntaxError: Custom media query --mx-1 is not defined
❯ pnpm build
> remix-demo@ build /home/predaytor/remix-stylex
> remix vite:build
vite v5.2.8 building for production...
✓ 85 modules transformed.
x Build failed in 922ms
SyntaxError: [vite-plugin-stylex] Custom media query --mx-1 is not defined
at napi_new_instance (file:///home/predaytor/remix-stylex/node_modules/.pnpm/[email protected]/node_modules/lightningcss/node_modules/napi-wasm/index.mjs:770:19)
at wasm://wasm/02920906:wasm-function[99]:0x37a6e
at wasm://wasm/02920906:wasm-function[76]:0x1d52e
at Object.bundle (file:///home/predaytor/remix-stylex/node_modules/.pnpm/[email protected]/node_modules/lightningcss/node_modules/napi-wasm/index.mjs:262:19)
at bundleAsync (file:///home/predaytor/remix-stylex/node_modules/.pnpm/[email protected]/node_modules/lightningcss/async.mjs:72:23)
at Module.bundleAsync (file:///home/predaytor/remix-stylex/node_modules/.pnpm/[email protected]/node_modules/lightningcss/wasm-node.mjs:74:10)
at compileLightningCSS (file:///home/predaytor/remix-stylex/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:33250:46) {
fileName: '',
loc: { line: 9, column: 1 },
data: { type: 'CustomMediaNotDefined', name: '--mx-1' },
code: 'PLUGIN_ERROR',
plugin: 'vite-plugin-stylex',
hook: 'renderChunk'
}
ELIFECYCLE Command failed with exit code 1.
The only change I made was to remove <LiveReload />
as it was already obsolete in Remix Vite.
https://remix.run/docs/en/main/future/vite#hmr--hdr
from vite-plugin-stylex.
@nonzzz thank you!
from vite-plugin-stylex.
Related Issues (20)
- Style declaration including only `null` values result in errors being thrown HOT 6
- Preload styles via <link rel="stylesheet" /> HOT 8
- npm run dev not working HOT 13
- add support for react-strict-dom as stylex soucre HOT 3
- LightningCSS does not work in dev mode (HMR) HOT 2
- Cannot use variables HOT 5
- Unnecessary duplicate assets included in the build when using `?url` style imports HOT 15
- [vite:css] Cannot read properties of null (reading 'moduleGraph') HOT 5
- [IMPROVE]: Refactor plugin logic and add new features
- Vite: css hmr is not supported in runtime mode. HOT 7
- Inconsistent bundling of css assets between builds (Remix) HOT 2
- Improve Caching HOT 2
- Plan: 0.8.0
- Bundle size increased and slow after upgrading to `0.8` HOT 3
- Version: 0.8.1 HOT 2
- Histoire unable to build when using Nuxt + Stylex
- Issue on watch production build. HOT 2
- missing github repo in package.json HOT 1
- Uncaught TypeError: can't access property "__k", t2 is null HOT 20
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-plugin-stylex.