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

add regex option for specifying a set of file extensions #19

Merged
merged 2 commits into from
Jun 8, 2016
Merged

add regex option for specifying a set of file extensions #19

merged 2 commits into from
Jun 8, 2016

Conversation

stoikerty
Copy link
Contributor

Right now, if I have several files that are required within webpack using file-loader. Those are png's, svg's etc but they're not being included in the output manifest-file. To allow those files to be added to the manifest, I've added the extensionsRegex-option to the constructor.

Example:

new ManifestRevisionPlugin(
  path.resolve(PATHS.build, 'manifest.json'),
  {
    rootAssetPath: PATHS.rootAssetPath,
    ignorePaths: [],
    extensionsRegex: /\.(jpe?g|png|gif|svg)$/i,
  }
),

Using this option, all assets are included appropriately in the resulting manifest-file for my particular case.

This PR might also solve Issue #12.

@nickjj
Copy link
Owner

nickjj commented Jun 8, 2016

Looks good and this is a pretty big deal. Thanks for the contribution.

@nickjj nickjj merged commit b5c60fa into nickjj:master Jun 8, 2016
@stoikerty
Copy link
Contributor Author

stoikerty commented Jun 8, 2016

Awesome, thanks for merging that! You're welcome 😃
I was just about to add a reference to the Readme.
Created a follow-up PR for it #20

@stoikerty stoikerty deleted the feature/additional-regex-option branch June 8, 2016 17:37
@stoikerty
Copy link
Contributor Author

@nickjj
Let me know when you've done the release so we can update our package.json with the npm reference.

@nickjj
Copy link
Owner

nickjj commented Jun 8, 2016

@stoikerty Just pushed v0.3 with it. It should be on npm (or within seconds).

@stoikerty
Copy link
Contributor Author

That was wicked fast! thanks

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

Successfully merging this pull request may close these issues.

2 participants