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

Filename filtering #269

Closed
wants to merge 2 commits into from
Closed

Conversation

lcxfs1991
Copy link
Contributor

change the filename for css

@codecov-io
Copy link

codecov-io commented Oct 15, 2016

Current coverage is 80.82% (diff: 100%)

Merging #269 into webpack-1 will increase coverage by 0.05%

@@           webpack-1       #269   diff @@
===========================================
  Files              4          4          
  Lines            338        339     +1   
  Methods           72         72          
  Messages           0          0          
  Branches          71         72     +1   
===========================================
+ Hits             273        274     +1   
  Misses            65         65          
  Partials           0          0          

Powered by Codecov. Last update 2db50ee...fa1a429

@bebraw
Copy link
Contributor

bebraw commented Dec 18, 2016

The idea looks good to me. I'm not sure of the naming so maybe others can comment on that.

Please sign the CLA in any case.

@lcxfs1991
Copy link
Contributor Author

@bebraw have you also considered this for the plugin for webpack2?

@bebraw
Copy link
Contributor

bebraw commented Jan 22, 2017

It's up to Tobias.

I think I would overload filename now rather than having another field. Then you would end up with:

new ExtractTextPlugin(({ name }) => `stylesheets/${name}.css`);
new ExtractTextPlugin({ filename: ({ name }) => `stylesheets/${name}.css` });

That's as flexible as it can get. The same idea would work elsewhere in webpack too if this scheme is acceptable.

@lcxfs1991
Copy link
Contributor Author

yep. Shall we wait for the scheme, maybe next version of webpack?

@bebraw
Copy link
Contributor

bebraw commented Jan 22, 2017

It needs a design decision, yeah.

@bebraw bebraw changed the title Webpack 1 Filename filtering Jan 22, 2017
@bebraw bebraw added this to the Webpack 2 release milestone Jan 24, 2017
@bebraw
Copy link
Contributor

bebraw commented Jan 26, 2017

@lcxfs1991 Would it be possible for you to refactor the idea to follow the specification I discussed? Instead of a new field we would overload the current filename. That would give us the feature without growing the API.

@bebraw bebraw modified the milestones: Webpack 2 release, 2.1 Jan 28, 2017
@lcxfs1991
Copy link
Contributor Author

lcxfs1991 commented Feb 21, 2017

@bebraw I have refractor my code and add test cases. Please check.

pull request:
#423

@lcxfs1991
Copy link
Contributor Author

this one can be closed

@lcxfs1991 lcxfs1991 closed this Feb 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants