question

PiyumiPerera-0571 avatar image
0 Votes"
PiyumiPerera-0571 asked PiyumiPerera-0571 edited

How cache busting works in react outlook add-in?

Hi,
I am developing a react outlook add-in. I have created a basic add-in using yeoman generator. I was using
ng 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?



office-addins-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PiyumiPerera-0571 ,

Welcome to our forum.

Looks like your issue might be more related to add-in development. Please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client and know little about add-in development. In order to better solve your problem, we will remove "Office Outlook ITpro" tag.

Thanks for your understanding and hope your question will be resolved soon!

0 Votes 0 ·

0 Answers