Giter Club home page Giter Club logo

Comments (8)

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Thanks for reporting this issue. Could you please provide a bit more detail as to how your app is setup?

Do you have a main app.css file that's importing your pods using postcss-import and something like @import "../components/**/*.css"?

When you say that it works when you boot the server, does that mean that the component css is being compiled, but the files aren't watched correctly for changes?

I've seen similar issues reported with ember-cli-sass, so this might be related to some ember-cli changes, but I'd like to dig into it further.

from ember-cli-postcss.

timohofmeijer avatar timohofmeijer commented on May 30, 2024

I use an app.css manifest file and import all component stylesheets using @import 'components/my-component/style.less'.

When booting ember-cli, everything is compiled as expected, including the component stylesheet. File changes in component stylesheets are picked up by watchman but do not trigger the compiler while files imported from the app/styles directory do trigger the compiler on change.

I've got the same issue with the ember-cli-less addon. I poked around in both addon and ember-cli to find where the postcss compiler is trigged without success.

This issue occurs with a new ember-cli 2.2.0-beta.2 app on osx running node 4.2.4

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Thanks for providing more details on your setup.

I've been reading up on the subject and from what I can tell it's caused by an issue with ember-cli as seen here: ember-cli/ember-cli#2561

Unfortunately I don't think this is something that can be fixed in the addon. From what I've read it looks like you may have to move your styles into styles/components or at least somewhere in the styles folder until the pod feature officially lands in ember-cli.

I'm open to suggestions or other ideas, but it seems to be an issue with all preprocessors and held up due to work on the internals of ember-cli.

from ember-cli-postcss.

timohofmeijer avatar timohofmeijer commented on May 30, 2024

I also came across the issue you referred to. I'll work around it until its resolved then. At least it’s good this is mentioned here also, for our fellow pod heads ; ). Thanks for looking into it.

from ember-cli-postcss.

vasconita avatar vasconita commented on May 30, 2024

I can't even use this plugin with pod structure. I mean, my problem isn't just about watching files.

If you use pods you'll need to use an import like this:

@import '../pods/components/**/*.css'

How can you reference css files outside styles folder? Because I'm not being able to make it work.

I was thinking it was a Postcss Import Plugin problem, but I don't know if I'm missing something.

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Hey @vasconita, what version of the import plugin are you using? They removed glob (*) support in version 8.0, so your import won't work as expected. The details, and a workaround using resolve, are detailed in the changelog here: https://github.com/postcss/postcss-import/blob/master/CHANGELOG.md#800---2015-01-27

You should be able to import files outside of the styles folder, but as mentioned above it likely won't trigger a recompilation on save due to a longstanding issue with ember-cli.

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Updates to ember-cli and the addition of the filter mode in V3 of this add-on should allow you to use the pods structure and apply postcss plugins to all of your styles.

Is anyone able to help test this in a pods project?

from ember-cli-postcss.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Closing due to inactivity and the filter set of options should support a pod structure project.

from ember-cli-postcss.

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.