2023-02-26 01:30
This commit is contained in:
38
lit-element-starter-ts/rollup.config.js
Normal file
38
lit-element-starter-ts/rollup.config.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
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: 'my-element.js',
|
||||
output: {
|
||||
file: 'my-element.bundled.js',
|
||||
format: 'esm',
|
||||
},
|
||||
onwarn(warning) {
|
||||
if (warning.code !== 'THIS_IS_UNDEFINED') {
|
||||
console.error(`(!) ${warning.message}`);
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
replace({'Reflect.decorate': 'undefined'}),
|
||||
resolve(),
|
||||
terser({
|
||||
ecma: 2017,
|
||||
module: true,
|
||||
warnings: true,
|
||||
mangle: {
|
||||
properties: {
|
||||
regex: /^__/,
|
||||
},
|
||||
},
|
||||
}),
|
||||
summary(),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user