-
-
Notifications
You must be signed in to change notification settings - Fork 384
Add support for the insert option #459
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for work, need add tests
@evilebottnawi thank you for taking a look. Can you be a bit more specific as for what kind of extra tests we need to merge this PR? I have added some already but I wasn't quite sure if those were enough or the right way to test this feature. |
We need test case, here examples https://github.com/webpack-contrib/mini-css-extract-plugin/tree/master/test/cases, just add test for |
Should I just create a new folder in |
yes,
Let's implement this, it is not difficult |
Is there any progress here? It's not very difficult, but it's urgent. |
@132yse I might have time to work on this sometime next week. If you need it earlier please go ahead and take over it, you'd just need to add tests. |
08242fb
to
c68ae52
Compare
Codecov Report
@@ Coverage Diff @@
## master #459 +/- ##
==========================================
+ Coverage 88.65% 88.81% +0.15%
==========================================
Files 5 5
Lines 423 429 +6
Branches 92 97 +5
==========================================
+ Hits 375 381 +6
Misses 46 46
Partials 2 2
Continue to review full report at Codecov.
|
expect(computedValue).toBe(''); | ||
|
||
const script = document.createElement('script'); | ||
script.src = outputPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilebottnawi it seems that webpack
is not emitting this file and it 404s. Also I am not sure jsdom supports getComputedStyle
. In that case I think we either get rid of this test or need to set up something like Puppeteer which IMO is out of scope.
@giuseppeg @evilebottnawi Any Update here?! We might need this for one of our use cases. Any possibility this is getting merged soon? |
I think @ScriptedAlchemy took over this but his PR is blocked. |
Merge my PR into your branch if needed. I’m not blocked just ran out of time to perform the last requests. Started working on module Federation and that’s a monster that has taken all my capacity |
If you need it now. Extract css has us it for months. https://github.com/faceyspacey/extract-css-chunks-webpack-plugin |
#609 improved |
Yaaaay |
This PR contains a:
New feature.
Motivation / Use-Case
This new option mirrors the behavior of
style-loader
which allows users to pass a custominsert
function that takes care of inserting chunks. This is particularly useful when the initiator is in the parent window but the application renders inside of aniframe
.Breaking Changes
None. This change is backwards compatible: when this option is not provided the plugin will keep inserting link tags as before i.e. to the document's
head
.Additional Info
I found a similar PR #371 but the proposed API forces the user to return an element that the plugin will use as insertion point.