How to use the @open-wc/building-rollup.createCompatibilityConfig function in @open-wc/building-rollup

To help you get started, we’ve selected a few @open-wc/building-rollup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-wc / open-wc / packages / demoing-storybook / src / build / build.js View on Github external
async function buildPreview(outputDir, assets) {
  const configs = createCompatibilityConfig({
    input: 'noop',
    extensions: [...DEFAULT_EXTENSIONS, 'mdx'],
    plugins: { indexHTML: false },
  });

  configs[0].output.dir = path.join(outputDir, 'legacy');
  configs[1].output.dir = outputDir;

  configs[0].plugins.unshift(
    indexHTML({
      indexFilename: 'iframe.html',
      indexHTMLString: assets.iframeHTML,
      multiBuild: true,
      legacy: true,
      polyfills: {
        dynamicImport: true,

@open-wc/building-rollup

Default configuration for working with rollup

MIT
Latest version published 8 months ago

Package Health Score

80 / 100
Full package analysis