How to use the @open-wc/building-rollup.createDefaultConfig 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 uprtcl / js-uprtcl / demos / simple-editor / rollup.config.js View on Github external
import { createDefaultConfig } from '@open-wc/building-rollup';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import json from 'rollup-plugin-json';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import replace from 'rollup-plugin-replace';

const config = createDefaultConfig({ input: './index.html' });

// map if you use an array of configs, otherwise just extend the config
export default {
  ...config,
  plugins: [
    replace({
      'process.env.NODE_ENV': JSON.stringify('development')
    }),
    resolve({ browser: true }),
    // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
    commonjs(),
    ...config.plugins,
    // Allow json resolution
    json()
  ],
  external: [],
github web-padawan / api-viewer-element / rollup.config.js View on Github external
import cpy from 'rollup-plugin-cpy';
import { createDefaultConfig } from '@open-wc/building-rollup';

const config = createDefaultConfig({
  input: './demo/index.html',
  indexHTMLPlugin: {
    minify: false
  }
});

export default {
  ...config,
  plugins: [
    ...config.plugins,
    cpy({
      files: ['demo/*.css'],
      dest: 'dist'
    })
  ]
};

@open-wc/building-rollup

Default configuration for working with rollup

MIT
Latest version published 9 months ago

Package Health Score

80 / 100
Full package analysis