Unexpected Inclusion of CSS in Build Output Without Import in ember 5.9

I have installed ember-power-select in a new project using ember-cli 5.9.

I only installed the addon and did not import the CSS or SCSS file. After running the command npm run build, I noticed that chunk files containing the ember-power-select CSS were created in the dist/assets folder.

1 Like

You may want to open an issue in ember-power-select. This issue implies that it should be explicitly opt-in if you’re using the v2 addon.

This issue not only occurs for ember-power-select addon, It also occurs in other addons as well. I have just given the example of ember-power-select.

Even though I removed the

@import 'ember-power-select/vendor/ember-power-select.css';

It still outputs the css to dist folder as chunk-*.css

Note: It was working fine in ember-cli 5.8

1 Like

This part is interesting… i’m taking a wild guess here but the only difference in the 5.8 and 5.9 blueprints that seems relevant is that ember-auto-import was bumped to 2.7.3 with Ember 5.9. Maybe as a first step try downgrading ember-auto-import to 2.7.2 (or better yet, whatever it was before you updated to ember 5.9) and if that fixes it consider opening an issue in ember-auto-import about 2.7.3 release.

We tried this, I guess this issue exists in 5.8 also, The last version which we pushed to production was 5.4.

I am including the screenshots Hope it may help you.

app.css

output folder

image

You can see that even though i haven’t imported any css. It outputs the css to dist folder as chunk-*.css

Is this the expected behaviour in upcomming versions?