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

fix(schema): allow the output filename to be a {Function} #1409

Merged
merged 4 commits into from Aug 22, 2018
Merged

fix(schema): allow the output filename to be a {Function} #1409

merged 4 commits into from Aug 22, 2018

Conversation

berthertogen
Copy link
Contributor

  • This is a bugfix
  • This is a code refactor
  • This is a test update
  • This is a typo fix
  • This is a metadata update
  • modification request

For Bugs and Features; did you add new tests?

No

Motivation / Use-Case

Allow the output filename to be a function.
eg:

// webpack.config.js
entry: {
    vendors: './vendors.js',
    bundle: './bundle.js',
    bundlepreview: './bundle.preview.js',
},
output: {
    filename: (data) => data.chunk.name === "bundlepreview" ? '[name].js' : '[name].[chunkhash].js',
    path: buildPath
},

Breaking Changes

None

Additional Info

Closes #1408

@jsf-clabot
Copy link

jsf-clabot commented May 14, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 14, 2018

Codecov Report

Merging #1409 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1409   +/-   ##
=======================================
  Coverage   78.94%   78.94%           
=======================================
  Files           5        5           
  Lines         494      494           
  Branches      161      161           
=======================================
  Hits          390      390           
  Misses        104      104

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 807c846...f37402e. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Need test

@kohlikohl
Copy link

@berthertogen Thanks for the fix. @evilebottnawi Any chance you could look over it again and get this merged in? Would be tremendously helpful.
Thanks in advance.

@michael-ciniawsky michael-ciniawsky changed the title modification: allow the output filename to be a function fix(schema): allow the output filename to be a {Function} Aug 21, 2018
@michael-ciniawsky michael-ciniawsky added this to the 3.1.6 milestone Aug 21, 2018
@michael-ciniawsky
Copy link
Member

Released in v3.1.6 🎉

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

Successfully merging this pull request may close these issues.

Allow the output filename to be a function
5 participants