I'm trying to build a plugin that would write webpack build hash in a file that a backend framework (in this case Django) could read for better integration between front and backend. The current UI app reads the generated stats JSON and then deletes it, but I haven't found a way to hook into this data. It would be useful to be able to get either the hash or the full webpack generated stats file in development mode, too.
For example, add configuration like: "webpackStats: true" and "webpackStatsFile: 'stats.json'"
I think a plugin like this one should solve this nicely for you.
https://www.npmjs.com/package/stats-webpack-plugin
No need for another config option in my opinion.
// vue.config.js
const StatsPlugin = require('stats-webpack-plugin')
module.exports = {
configureWebpack: {
plugins: [new StatsPlugin('stats.json')]
}
}
Most helpful comment
I think a plugin like this one should solve this nicely for you.
https://www.npmjs.com/package/stats-webpack-plugin
No need for another config option in my opinion.