Coder Social home page Coder Social logo

Comments (6)

astahmer avatar astahmer commented on June 14, 2024

can you try setting your config.outExtension to "js"

from panda.

refty10 avatar refty10 commented on June 14, 2024

can you try setting your config.outExtension to "js"

Thanks for the reply.
I have tried your advice.
I added outExtension: 'js' to panda.config.ts and still get the same Warning.
CSS content is changed and a warning is output as before when a hot read occurs.
I also removed styled-system and ran npx panda codegen again with similar results.

from panda.

astahmer avatar astahmer commented on June 14, 2024

sorry to hear that. It looks like a webpack (used by nextjs) specific issue, maybe css-loader has a hard time with CSS @layer ? I'm not sure we can do anything about it

maybe using this ignore comment can help ? https://webpack.js.org/loaders/css-loader/#disable-url-resolving-using-the--webpackignore-true--comment
or maybe opting out of layers could help https://www.npmjs.com/package/@csstools/postcss-cascade-layers

from panda.

refty10 avatar refty10 commented on June 14, 2024

sorry to hear that. It looks like a webpack (used by nextjs) specific issue, maybe css-loader has a hard time with CSS @layer ? I'm not sure we can do anything about it

maybe using this ignore comment can help ? https://webpack.js.org/loaders/css-loader/#disable-url-resolving-using-the--webpackignore-true--comment or maybe opting out of layers could help https://www.npmjs.com/package/@csstools/postcss-cascade-layers

Thanks for the reply.
I added webpackIgnore: true to global.css.

//src\styles\globals.css

/* webpackIgnore: true */
@layer reset, base, tokens, recipes, utilities;

But there is no change, the Warning is still output.


How to install this.
https://www.npmjs.com/package/@csstools/postcss-cascade-layers

I could not figure out how to configure panda-css with this plugin.
Perhaps not using global.css and putting @layers in config instead?
It would be great if you could show a sample.

from panda.

astahmer avatar astahmer commented on June 14, 2024

just pushed this PR which might solve your issue, I'm not sure since I can't test it 😅

I could not figure out how to configure panda-css with this plugin.

like any other postcss plugin, so just installing and adding it here should be enough

module.exports = {
  plugins: {
    '@pandacss/dev/postcss': {}
+     '@csstools/postcss-cascade-layers': {},
  }
}

from panda.

BorisZubchenko avatar BorisZubchenko commented on June 14, 2024

Having the same issue for a fresh project. @csstools/postcss-cascade-layers doesn't help as well. This warning is so annoying since it runs for every recompiling.

from panda.

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.