Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

fix(index): remove empty assets #746

Merged
merged 3 commits into from
Mar 19, 2018

Conversation

lili21
Copy link

@lili21 lili21 commented Mar 9, 2018

@jsf-clabot
Copy link

jsf-clabot commented Mar 9, 2018

CLA assistant check
All committers have signed the CLA.

@lili21
Copy link
Author

lili21 commented Mar 14, 2018

Hello, anyone please look at this ?

@alexander-akait
Copy link
Member

@lili21 can you add tests?

@@ -12,7 +12,7 @@ const Configuration = {
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
'type-enum': [2, 'always', [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't change eslint config file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this lint config is invalid. cause commitlint keep yelling at me about value of type-enum is wrong.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lili21 this PR please send to webpack-default repo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like webpack-default have nothing to do with commitlint.config.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

@lili21
Copy link
Author

lili21 commented Mar 14, 2018

I guess I have to change the intergration test code to test empty chunk rather than just add test case.
any better ideal ?

@alexander-akait
Copy link
Member

@lili21
Copy link
Author

lili21 commented Mar 14, 2018

what I mean is I can't just add test case. I have to change the webpack-integration.test.js code for testing if empty chunk have been generated.

@lili21
Copy link
Author

lili21 commented Mar 15, 2018

couldn't find a way to test it without change the way of integration test. maybe you can give me some advice ?

@@ -0,0 +1,2 @@
require('./a.txt');
require('./b.txt');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \n in end of file 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

expect(readFileOrEmpty(actualPath)).toMatchSnapshot();
});

glob
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need glob here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to get all files in a directory recursively. I can do it without glob, but why not ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lili21
Copy link
Author

lili21 commented Mar 19, 2018

@evilebottnawi

@alexander-akait
Copy link
Member

/cc @michael-ciniawsky

@michael-ciniawsky michael-ciniawsky changed the title fix: remove empty assets fix(index): remove empty assets Mar 19, 2018
Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lili21 Thx

@lili21 lili21 deleted the fix/empty-chunk branch March 20, 2018 05:57
@wKovacs64
Copy link

I see the "just use mini-css-extract-plugin" comments closing other issues, but since this PR was already merged into next, will we see a new release that includes it?

@michael-ciniawsky
Copy link
Member

Yep, I will cut a 'final' release including this fix. I just need to finish some other chores before and add a deprecation note to the README and npm deprecate the package properly. Hopefully today...

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

Successfully merging this pull request may close these issues.

5 participants