Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

antd + babel-plugin-import css how to load? #854

Closed
Jarryxin opened this issue Aug 16, 2021 · 3 comments
Closed

antd + babel-plugin-import css how to load? #854

Jarryxin opened this issue Aug 16, 2021 · 3 comments

Comments

@Jarryxin
Copy link

Jarryxin commented Aug 16, 2021

Describe the bug or question
antd ui framework ,use babel-plugin-import,extra css file(mini-css-extract-plugin) how to load?

To Reproduce

// css assets need update by manual
<link rel="stylesheet" href="http://xx.com/a_app/static/css/main.95bd9304.css" />
<link rel="stylesheet" href="http://xx.com/b_app/static/css/main.a8916f84.css" />
// js assets
<script type="systemjs-importmap" src="//xx.com/json/import-map.json"></script>

Expected behavior
extra css file don't know how to load,hope load css by automatic

Screenshots and/or console output
If applicable, add screenshots or console output to help explain your problem.

Additional context
Add any other context about the problem or question here.

@joeldenning
Copy link
Member

I don't understand the question very well. Are you asking how you can load CSS files that are specific to a microfrontend? If so, see https://single-spa.js.org/docs/ecosystem-css.

If you're looking for how to load antd with systemjs, see https://codesandbox.io/s/wonderful-proskuriakova-kb9fh?file=/index.html.

@Jarryxin
Copy link
Author

thanks👍 , https://single-spa.js.org/docs/ecosystem-css single-spa-css solved my problem.
single-spa/single-spa-css#7 webpack4 need support, my project uses webpack4

@joeldenning
Copy link
Member

Closing this issue as it seems to be resolved. The webpack 4 support for single-spa-css is tracked in the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants