From b3cddba6a1c5c6a78c3782e47765f7ad2e8ffb29 Mon Sep 17 00:00:00 2001 From: Boris Petrov Date: Mon, 11 Oct 2021 13:19:10 +0300 Subject: [PATCH] Fix not passing the correct options to `style-loader` and `css-loader` --- packages/ember-auto-import/ts/webpack.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/ember-auto-import/ts/webpack.ts b/packages/ember-auto-import/ts/webpack.ts index 3db4b4b4e..59b3418a6 100644 --- a/packages/ember-auto-import/ts/webpack.ts +++ b/packages/ember-auto-import/ts/webpack.ts @@ -171,8 +171,14 @@ export default class WebpackBundler extends Plugin implements Bundler { { test: /\.css$/i, use: [ - { loader: 'eai-style-loader', options: [...this.opts.packages].find(pkg => pkg.styleLoaderOptions) }, - { loader: 'eai-css-loader', options: [...this.opts.packages].find(pkg => pkg.cssLoaderOptions) }, + { + loader: 'eai-style-loader', + options: [...this.opts.packages].find(pkg => pkg.styleLoaderOptions)?.styleLoaderOptions, + }, + { + loader: 'eai-css-loader', + options: [...this.opts.packages].find(pkg => pkg.cssLoaderOptions)?.cssLoaderOptions, + }, ], }, ],