nickjj / manifest-revision-webpack-plugin

Write out a manifest file containing your versioned webpack chunks and assets.
ISC License
124 stars 40 forks source link

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

Closed stoikerty closed 8 years ago

stoikerty commented 8 years ago

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 commented 8 years ago

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

stoikerty commented 8 years ago

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 https://github.com/nickjj/manifest-revision-webpack-plugin/pull/20

stoikerty commented 8 years ago

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

nickjj commented 8 years ago

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

stoikerty commented 8 years ago

That was wicked fast! thanks