doesdev / rollup-plugin-analyzer

Mad metrics for your rollup bundles, know all the things

Home Page:http://rollup-plugin-analyzer.doesdev.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

danielo515 opened this issue · 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