mirror of
https://github.com/les-briques-du-web/briques-poster.git
synced 2026-03-10 00:41:17 +00:00
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
import merge from 'deepmerge';
|
|
import copy from 'rollup-plugin-copy'
|
|
|
|
// use createSpaConfig for bundling a Single Page App
|
|
import { createSpaConfig } from '@open-wc/building-rollup';
|
|
|
|
// use createBasicConfig to do regular JS to JS bundling
|
|
// import { createBasicConfig } from '@open-wc/building-rollup';
|
|
|
|
const baseConfig = createSpaConfig({
|
|
// use the outputdir option to modify where files are output
|
|
// outputDir: 'dist',
|
|
|
|
// if you need to support older browsers, such as IE11, set the legacyBuild
|
|
// option to generate an additional build just for this browser
|
|
// legacyBuild: true,
|
|
|
|
// development mode creates a non-minified build for debugging or development
|
|
developmentMode: process.env.ROLLUP_WATCH === 'true',
|
|
|
|
// set to true to inject the service worker registration into your index.html
|
|
injectServiceWorker: false,
|
|
});
|
|
|
|
export default merge(baseConfig, {
|
|
// if you use createSpaConfig, you can use your index.html as entrypoint,
|
|
// any <script type="module"> inside will be bundled by rollup
|
|
input: './index.html',
|
|
plugins: [
|
|
copy({
|
|
targets: [{ src: 'assets/**/*', dest: './dist/assets' }],
|
|
// set flatten to false to preserve folder structure
|
|
flatten: false,
|
|
})
|
|
],
|
|
|
|
// alternatively, you can use your JS as entrypoint for rollup and
|
|
// optionally set a HTML template manually
|
|
// input: './app.js',
|
|
});
|