async function executeBuildEntry(options) {
  const config = rollupConfig(options)
  const buildBundle = await rollup.rollup(config)
  const generated = await buildBundle.generate(config.output)
  await buildBundle.write(config.output)
  return {
    path: config.output.file,
    code: generated.output[0].code,
    isDev: /apexcharts\.js$/.test(config.output.file)
  }
}
',
        plugins: ['@babel/plugin-proposal-class-properties'].concat(
          opts.istanbul ? ['istanbul'] : []
        )
      }),
      replace({ 'process.env.NODE_ENV': JSON.stringify(opts.env) })
    ],
    output: {
      file: opts.dest,
      format: opts.format,
      banner: opts.banner,
      name: 'ApexCharts'
    }
  }

  if (opts.env === 'production') {
    config.plugins.push(
      strip({
        debugger: true,
        functions: ['console.log', 'debug', 'alert'],
        sourceMap: false
      }),
      terser({
        output: {
          ascii_only: true
        }
      })
    )
  }

  if (opts.assets) {
    config.plugins.push(
      copy(
        [
          {
            files: 'src/assets/apexcharts.css',
            dest: 'dist'
          },
          {
            files: 'src/locales/*.*',
            dest: 'dist/locales'
          }
        ],
        {
          verbose: true,
          watch: false
        }
      )
    )
  }

  return config
}

/**
Build code with Rollup from build configuration
@param {*} options Build options