search_web_components-1.0.x-dev/lit/rollup.config.js
lit/rollup.config.js
import summary from 'rollup-plugin-summary';
import {terser} from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
export default {
input: 'dist/index.js',
output: {
file: 'search-web-components.min.js',
format: 'esm',
},
onwarn(warning) {
if (warning.code !== 'THIS_IS_UNDEFINED') {
console.error(`(!) ${warning.message}`);
}
},
plugins: [
replace({'Reflect.decorate': 'undefined', preventAssignment: true}),
resolve(),
/**
* This minification setup serves the static site generation.
* For bundling and minification, check the README.md file.
*/
terser({
ecma: 2021,
module: true,
warnings: true,
mangle: {
properties: {
regex: /^__/,
},
},
}),
summary(),
],
};
