Giter VIP home page Giter VIP logo

Comments (4)

joeldenning avatar joeldenning commented on June 3, 2024 1

Hmm publicPath set on MiniCssExtractPlugin.loader should do the trick. I don't know why it isn't working for you

from coexisting-angular-microfrontends.

joeldenning avatar joeldenning commented on June 3, 2024

Yes, it is possible. I believe all that is needed is to use --deploy-url when doing ng build. See https://github.com/AMPATH/ng2-amrs/tree/single-spa which is an example that has font-awesome loading properly.

from coexisting-angular-microfrontends.

brechtvhb avatar brechtvhb commented on June 3, 2024

Hi Joel,

Thanks for your response. I should have mentoined we are using Angular8 with the new recommended webpackbuilder. Your example seems to be for Anular6.

I think I can solve this issue by defining additional rules in the extra-webpack.config.js file but I'm not experienced with webpack.

What I tried now is this, but without luck. Any idea what I am doing wrong? I would like to prepend "/navigation/" in the url('') statements in my CSS files.

const singleSpaAngularWebpack = require('single-spa-angular/lib/webpack').default
const MiniCssExtractPlugin  = require('mini-css-extract-plugin');

module.exports = (angularWebpackConfig, options) => {
  const singleSpaWebpackConfig = singleSpaAngularWebpack(angularWebpackConfig, options)

  singleSpaAngularWebpack.module = {
      rules : [
      {
        test: /\.scss$/,
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
            options: {
              publicPath: '/navigation/'
            }
          },
          {loader: 'css-loader'},
          {loader: 'sass-loader'}
        ]
      }
    ]
  };


  // Feel free to modify this webpack config however you'd like to
  return singleSpaWebpackConfig;
}

from coexisting-angular-microfrontends.

joeldenning avatar joeldenning commented on June 3, 2024

Closing because of inactivity.

from coexisting-angular-microfrontends.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.