-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Create asset filenames mapping on the build output #891
Conversation
I use danethurber/webpack-manifest-plugin on Webpack production configuration to create a file named `asset-manifest.json` which contain a mapping of all asset filenames to their corresponding output file. `asset-manifest.json` will be located at the root of output folder. This'll resolve facebook#600
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
@@ -250,7 +251,10 @@ module.exports = { | |||
} | |||
}), | |||
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`. | |||
new ExtractTextPlugin('static/css/[name].[contenthash:8].css') | |||
new ExtractTextPlugin('static/css/[name].[contenthash:8].css'), | |||
new ManifestPlugin({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comment explaining why it is useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment added. 😄
@@ -65,6 +65,7 @@ | |||
"url-loader": "0.5.7", | |||
"webpack": "1.13.2", | |||
"webpack-dev-server": "1.16.1", | |||
"webpack-manifest-plugin": "^1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep versions exact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed its version to be exactly 1.0.1
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
LGTM. Thank you! |
* Create asset filenames mapping on the build output I use danethurber/webpack-manifest-plugin on Webpack production configuration to create a file named `asset-manifest.json` which contain a mapping of all asset filenames to their corresponding output file. `asset-manifest.json` will be located at the root of output folder. This'll resolve facebook#600 * Add an explanation for ManifestPlugin * Make webpack-manifest-plugin's version exact
* Create asset filenames mapping on the build output I use danethurber/webpack-manifest-plugin on Webpack production configuration to create a file named `asset-manifest.json` which contain a mapping of all asset filenames to their corresponding output file. `asset-manifest.json` will be located at the root of output folder. This'll resolve facebook#600 * Add an explanation for ManifestPlugin * Make webpack-manifest-plugin's version exact
To resolve #600
I use webpack-manifest-plugin on Webpack production configuration to create a file named
asset-manifest.json
which contain a mapping of all asset filenames to their corresponding output file.asset-manifest.json
will be located at the root of output folder.Here's the example from a newly created project.
You can see that it doesn't map those files from
public/
. What do you think?