question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can you make it more clear how to use this?

See original GitHub issue

Hey, I’m having an issue where I’m using extract-text-webpack-plugin with codesplitting (currently react-loadable):

const LoadableFeatures = Loadable({
    loader: () => import('../components/features'),
    loading: Loading,
});

and this is using syntax-dynamic-import. I’m trying to figure out what combination of things I need to do to use your libraries since they seem to be solving the thing I want.

Do I need react-universal-component or just babel-plugin-universal-import? How do I dynamically load a component that has its own CSS and have that CSS chunked?

I’ve tried just using react-universal-component by itself:

const LoadablePricing = universal(() => import('../components/pricing'));

and the CSS doesn’t get extracted to its own chunk.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
faceyspaceycommented, Dec 3, 2017

For the second point you usually don’t have to have them both, but if it’s not working try adding the additional plugin.

Since you aren’t doing SSR there is another plugin by one of our users mentioned on the extract-css-chunks readme for SPAs that you need instead so dual import of both js plus CSS works.

0reactions
sontekcommented, Dec 3, 2017

The sass thing was my fault, I’m down to just #1. The CSS from the async components aren’t loaded on the initial requested, they are loaded after if they aren’t on the initial request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

English Grammar Help: Clearer or More Clear?
The basic rules tell us that because clear is a one syllable adjective there is no need to use 'more.' But the reality...
Read more >
When is it grammatically correct to use “more clear” in place of ...
No, you shouldn't. It's not ever correct. “more clear” is not English. The expression is “clearer”. This is the Comparative of “clear ...
Read more >
"More clear" vs "Clearer": when to use "more" instead of "-er"?
The problem is that comparative adverbs like "better" make you think that "clearer" is the correct comparative adverbial form.
Read more >
Clearer vs. More Clear - Grammar.com
Clearer is already a comparative form, more is also used for comparative. It is meaningless to use two comparatives at the same time....
Read more >
make it clearer or make it more clear? - TextRanch
Jan 19, 2015 ... “Thanks, you've helped make it clearer for me”. While more clear might be considered to be more formal: “Thank...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found