rollup-plugin-analyzer icon indicating copy to clipboard operation
rollup-plugin-analyzer copied to clipboard

Using the write to options makes the bundled index.html file point to the incorrect js files.

Open danielo515 opened this issue 4 years ago • 0 comments

Hello, thanks for this plugin. I noticed a weird behavior when using the writeTo function. For some reason, when I set it up like the snippet below, my produced index.html file points to the wrong js files. If I remove this plugin or that option then it works fine.

          analyzer({
            showExports: false,
            limit: 10,
            writeTo(analysis) {
              fs.writeFileSync('./stats.html', `<pre><code>${analysis}</code></pre>`);
            },
          }),

regards

danielo515 avatar Jan 21 '22 10:01 danielo515