title: Next.js create a polyfill.js file in dist folder
body: <p>I try to implement the Trading view library's next.js example.
  In <strong>_document.js</strong> file I have to import</p>
  <pre><code>&lt;script src=&quot;/static/datafeeds/udf/dist/polyfills.js&quot; /&gt;
  &lt;script src=&quot;/static/datafeeds/udf/dist/bundle.js&quot; /&gt;
  </code></pre>
  <p>But when I go to datafeeds/udf.dist folder only I can see is the <code>bundle.js</code> file.
  And inside the udf folder I have this package.json file</p>
  <pre><code>{
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;tslib&quot;: &quot;2.1.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@rollup/plugin-node-resolve&quot;: &quot;~9.0.0&quot;,
      &quot;rollup&quot;: &quot;~2.28.2&quot;,
      &quot;rollup-plugin-terser&quot;: &quot;~7.0.2&quot;,
      &quot;typescript&quot;: &quot;4.2.3&quot;
    },
    &quot;scripts&quot;: {
      &quot;compile&quot;: &quot;tsc&quot;,
      &quot;bundle-js&quot;: &quot;rollup -c rollup.config.js&quot;,
      &quot;build&quot;: &quot;npm run compile &amp;&amp; npm run bundle-js&quot;
    }
  }
  </code></pre>
  <p>and rollup.config.js</p>
  <pre><code>/* globals process */
  
  import { terser } from 'rollup-plugin-terser';
  import { nodeResolve } from '@rollup/plugin-node-resolve';
  
  const environment = process.env.ENV || 'development';
  const isDevelopmentEnv = (environment === 'development');
  
  export default [
      {
          input: 'lib/udf-compatible-datafeed.js',
          output: {
              name: 'Datafeeds',
              format: 'umd',
              file: 'dist/bundle.js',
          },
          plugins: [
              nodeResolve(),
              !isDevelopmentEnv &amp;&amp; terser({
                  ecma: 2017,
                  safari10: true,
                  output: { inline_script: true },
              }),
          ],
      },
  ];
  </code></pre>
  <p>When I run compile,bundle-js, and build scripts that only create the bundle.js file only. How can I create a polyfills.js file inside the dist folder? I hope this can be done with rollup pakcage.</p>