Hi,
I am developing a react outlook add-in. I have created a basic add-in using yeoman generator. I was usingng build dist --output-hashing=bundles to generate build files with hash values to avoid caching when I was developing an angular add-in.
I have noticed in webpack.config.js, CleanWebpackPlugin which remove all files inside webpack's output.path directory, as well as all unused webpack assets after every successful rebuild is used as follows.
plugins: [
new CleanWebpackPlugin(),
new CopyWebpackPlugin({
patterns: [
{
to: "taskpane.css",
from: "./src/taskpane/taskpane.css"
},
{
to: "[name]." + buildType + ".[ext]",
from: "manifest*.xml",
transform(content) {
if (dev) {
return content;
} else {
return content.toString().replace(new RegExp(urlDev, "g"), urlProd);
}
}
}
]}),
new ExtractTextPlugin('[name].[hash].css'),
new HtmlWebpackPlugin({
filename: "taskpane.html",
template: './src/taskpane/taskpane.html',
chunks: ['taskpane', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
filename: "commands.html",
template: "./src/commands/commands.html",
chunks: ["commands"]
}),
new webpack.ProvidePlugin({
Promise: ["es6-promise", "Promise"]
})
],
I need to know how cache busting works in react add-in, or is cache busting already implemented?