using single-spa-angular when i build the project my less transfer to js not css

156 Views Asked by At

i have angular project is child app using with single-spa-angular using UI library ng zorro and when i build the project with custom webpack my less will transfer js but i need transfer to css

the angular version 15 my angular.json setting

"styles": [
              "src/styles.scss",
              "node_modules/ng-zorro-antd/ng-zorro-antd.less",
              {
                "input": "src/styles/light.less",
                "bundleName": "light",
                "inject": false
              },
              {
                "input": "src/styles/dark.less",
                "bundleName": "dark",
                "inject": false
              }
            ],
"customWebpackConfig": {
              "path": "extra-webpack.config.js",
              "libraryName": "zorrothemetest",
              "libraryTarget": "umd"
            },

my extra-webpack.config

const singleSpaAngularWebpack = require('single-spa-angular/lib/webpack').default;

module.exports = (config, options) => {
  const singleSpaWebpackConfig = singleSpaAngularWebpack(config, options);
  return singleSpaWebpackConfig;
};

when i using extra-webpack.config will transfer less to js if i dont retrun singleSpaWebpackConfig , will transfer to css and i try add loader but not work how can i using extra-webpack.config and fix it

when i deploy i need export css files not a js files

0

There are 0 best solutions below