Giter Club home page Giter Club logo

Comments (9)

MoOx avatar MoOx commented on May 22, 2024

For my concern, I don't use glob/nor ember so I am probably not the best person to help. And I didn't write the glob feature, @kswedberg did.

from postcss-import.

kswedberg avatar kswedberg commented on May 22, 2024

@MoOx, thanks for calling this to my attention.
@jeffjewiss, I've never used ember-cli, but I can test it out with a regular postcss setup and livereload. It has been working fine piped through gulp and using gulp-watch. If you could give me more info about what you're using for the livereload setup, I'll try to match up as much of it as possible here and see if I can locate a problem.

from postcss-import.

jeffjewiss avatar jeffjewiss commented on May 22, 2024

@kswedberg sorry for the delay in replying.

I'm going to try and setup an isolated test case or new Ember project and share the repo in the hopes that it helps isolate or demonstrate the issue. I'll post here when I have something, cheers.

from postcss-import.

kswedberg avatar kswedberg commented on May 22, 2024

Great. Thanks, @jeffjewiss !

from postcss-import.

jeffjewiss avatar jeffjewiss commented on May 22, 2024

I created a test case with an Ember app generated using ember cli here: https://github.com/jeffjewiss/ember-cli-postcss-import-example

To install it and get it running you'll need to npm install bower install and then you should be able to start it with npm start.

There's a glob import in app/styles/app.css for the components folder. If you edit app/styles/components/test.css while the app is running (something trivial like changing the background color), the component styles are no longer imported. If you use the full path instead of a glob it works fine.

from postcss-import.

kswedberg avatar kswedberg commented on May 22, 2024

thanks for the example project, @jeffjewiss. I'll take a look as soon as I can.

from postcss-import.

kswedberg avatar kswedberg commented on May 22, 2024

@jeffjewiss I set up the project locally and got it running. I think the problem might have something to do with how ember (or broccoli?) caches the resulting files. Not sure. In any case, I was able to get things working fine by add from: 'app/styles/app.css' to app.postcssOptions.plugins[0].options in Brocfile.js. So the app variable declaration now looks like this:

var app = new EmberApp({
  postcssOptions: {
    plugins: [
      {
        module: postcssImport,
        options: {
          glob: true,
          from: 'app/styles/app.css'
        }
      }
    ]
  }
});

Let me know if that works for you, too.

from postcss-import.

jeffjewiss avatar jeffjewiss commented on May 22, 2024

@kswedberg thanks for looking in to this issue and finding a fix! I'm not familiar enough with how broccoli caches files to confirm if that's causing the issue, but I suspect it's related.

My solution was to update the broccoli plugin to extend the postcss options for each plugin so that they all have access to the "from" and "to" paths. I think that's likely better than having to repeat it for each plugin.

That seemed to fix the issue on my example app so I'm going to close this issue. I'll report back if it reappears on other apps.

Thanks!

from postcss-import.

kswedberg avatar kswedberg commented on May 22, 2024

Excellent. Glad it works, @jeffjewiss . And, yes, please let me know if the problem persists elsewhere.

from postcss-import.

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.