You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Best way to give parity with multiple CSS outputPaths after deprecation? #10818
Our Ember 3.28 app has two themes, light & dark, and there's a LESS file at packages/ourapp/app/styles/themes/light.less and packages/ourapp/app/styles/themes/dark.less, respectively.
These get compiled with ember-cli-less to light.css and dark.css based on the outputPaths config in packages/ourapp/ember-cli-build.js:
Our app - which is in a monorepo with the main package being packages/ourapp, has some small loader JS in its index.html file which loads either of these based on a setting stored in a cookie.
We're trying to upgrade to Ember 5.8 and deal with the headache of adding EAI 2 and Webpack - something that isn't an easy task, given the sheer size of our app.
While that guide might work fine for a single JS file (and presumably a single CSS file), it doesn't really go into any detail as to how to deal with multiple files with different names and paths from what the defaults might be.
I've been trying various things all day, from forcing ember-cli-less to have its own outputPaths (which didn't work - they get overridden with the app's default), to configuring a webpack less loader (which didn't work, as it doesn't seem to know about styles in the packages/styles package in our monorepo, which our app's main package imports via its package.json file.
Right now, the Ember 3.28 app builds the two master theme files based on styles imported from each of the monorepo packages quite happily... but I just don't see a clear path on how to do this under the new EAI 2 & Webpack ecosystem with no outputPaths config.
Can anyone recommend a way to give a like-for-like replacement for the outputPaths config with multiple LESS files that works with EAI 2 and Webpack 5?
Even the latest docs state "If you would like to change this behavior, or compile to multiple output stylesheets, you can adjust the Output Paths Configuration".
There has to be a way to give parity with what we could do with Ember 3.28 before we needed to use EAI 2 & Webpack, and while outputPaths config was supported.
Having these docs updated with the corresponding config would be super handy.
I got things working in the end... I copied ember-cli-less into our repo and hard-coded its outpuPaths config to include both the LESS files.
Activity
BillyRayPreachersSon commentedon Oct 1, 2025
Even the latest docs state "If you would like to change this behavior, or compile to multiple output stylesheets, you can adjust the Output Paths Configuration".
There has to be a way to give parity with what we could do with Ember 3.28 before we needed to use EAI 2 & Webpack, and while
outputPathsconfig was supported.Having these docs updated with the corresponding config would be super handy.
I got things working in the end... I copied
ember-cli-lessinto our repo and hard-coded itsoutpuPathsconfig to include both the LESS files.