question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addon styles not being imported

See original GitHub issue

Hello, I’m attempting to use this addon within another addon and am not sure if my setup is incorrect or if there is an issue with this addon. When I have included a styles.scss inside of a component folder and included: @import "pod-styles"; inside of addon/styles/addon.scss.

When I serve the addon I get a message: ember-component-css: You have not yet created a component style file.

And looking inside of vendor.css see the dummy file from lib/include-all.js.

I tried to track down the issue myself, by pulling down this addon and running a linked version with some logging, but the only thing I can figure out is that the Funnel returned in _getPodStyleFunnel doesn’t seem to be working.

I created an example addon repo with my setup: https://github.com/DHedgecock/component-css-addon

By the way thanks for the awesome addon. We’re using it in the production app that I work on and it’s hands down the best.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
webarkcommented, Nov 28, 2016

@DHedgecock I looked into right now actually, and turns out you just need to install ember-cli-sass in your dependencies, and create an app.scss in your tests/dummy/app/styles/ and you should be good to go. You’s still get one ember-component-css: You have not yet created a component style file. if you run ember serve cause you aren’t using it in your app, but it’s getting included in there anyways.

Hope this resolves your issue!! If it does, please close the issue, otherwise let me know what else isn’t working right. Thanks! 😄

0reactions
GottfridLcommented, Apr 19, 2017

I have now got the component-css-addon to build and work properly with tests when I do import ‘dummy/initializers/component-styles’ in each component-test.js file. My own addon is working too. Thank you for helping out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Addon: import own stylesheet (not vendored), possible ? #2258
I'm building an ember-cli addon, and cannot find the way to import a stylesheet that is not vendored (that the addon owns); I...
Read more >
Imports not working for ember-cli-sass in my addon
Hi I have an addon which has addon.scss in addon/styles/addon.scss. In my app which tests the addon, I simply have an app.scss.
Read more >
Import scss from node_modules within ember addon
scss . I believe this answer can start the discussion about creating ember add-ons.
Read more >
CSS - Parcel
Then, you can access each of the classes defined in the CSS file as an export from the module. import * as classes...
Read more >
style-loader - webpack
Automatically injects styles into the DOM using one <style></style> . Warning. Source maps do not work. component.js import "./styles.css" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found