Git Product home page Git Product logo

Comments (5)

nonzzz avatar nonzzz commented on September 28, 2024 2

@predaytor My mistake. A typo cause it. I'll release a new version to fix it.

from vite-plugin-stylex.

nonzzz avatar nonzzz commented on September 28, 2024 1

This issue may same as #14

from vite-plugin-stylex.

nonzzz avatar nonzzz commented on September 28, 2024 1

Try it now. v0.5.1 has been released.

from vite-plugin-stylex.

predaytor avatar predaytor commented on September 28, 2024

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.

predaytor avatar predaytor commented on September 28, 2024

@nonzzz thank you!

from vite-plugin-stylex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.