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

How do you actually generate the manifest.json file?? #47

Open RandallJEllis opened 5 years ago

RandallJEllis commented 5 years ago

Hello,

I'm new to Flask and web development generally, but from the readme, I'm not understanding how to actually generate the manifest.json file. For example, the Quickstart code -- where do you put that? In package.json? The webpack.config.js file? And whichever file you put it in, how do you run that file and generate the manifest.json file? A clearer explanation would be greatly appreciated, but I also apologize if this is plainly obvious and I'm just a n00b

nickjj commented 5 years ago

Hi,

This plugin would create the manifest.json for you at whatever location you supplied to the output path in your webpack config. Then Flask-Webpack would read in that manifest file.

There is a full example Flask project located at https://github.com/nickjj/flask-webpack/tree/master/flask_webpack/tests/test_app. Let me know if that helps.

RandallJEllis commented 5 years ago

Ok, how do you actually run the plugin and generate the file though? Is it "npx webpack" ?

nickjj commented 5 years ago

You would run webpack as usual.

If you follow the Flask example app project then:

npm start would run the watcher in development. npm build would build production assets.

Those commands work because they are defined in package.json at https://github.com/nickjj/flask-webpack/blob/master/flask_webpack/tests/test_app/package.json#L2.

germn commented 5 years ago

@RandallJEllis hi, this article helped me a lot to figure out how nodejs infrastructure works. May be it'll help you also.