Skip to content

Interesting problem with a root and mife where only some in component scoped css comes through on build #86

Answered by webJose
amalvivek asked this question in Q&A
Discussion options

You must be logged in to vote

Please see the contents returned by this CSS URL (in preview mode):

As you can see, it is incorrect. It is not CSS.

This is because you must set Vite's base property. Previous versions of this plug-in used to set this, but not anymore. You need to set your expected base path before building.

In your test-mife project, try this for configuration:

import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vitePluginSingleSpa from 'vite-plugin-single-spa';


// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(), vitePluginSingleSpa({
      type: "mife",
      serverPort: 3001
    })
  ],
  resolve

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@webJose
Comment options

Comment options

You must be logged in to vote
1 reply
@amalvivek
Comment options

Comment options

You must be logged in to vote
1 reply
@amalvivek
Comment options

Answer selected by amalvivek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants