emoji-picker-js/rollup.config.js

35 lines
884 B
JavaScript
Raw Permalink Normal View History

2022-03-24 09:28:15 +00:00
import commonjs from '@rollup/plugin-commonjs';
2020-09-30 04:14:53 +00:00
import postcss from 'rollup-plugin-postcss';
2022-03-24 09:28:15 +00:00
import { nodeResolve } from '@rollup/plugin-node-resolve';
2020-09-30 04:14:53 +00:00
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
const production = process.env.NODE_ENV === 'production';
export default {
input: 'src/index.ts',
output: {
file: 'dist/index.js',
format: 'es',
name: 'EmojiPicker'
},
watch: {
buildDelay: 500
},
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(
production ? 'production' : 'development'
)
}),
postcss({
extensions: ['.css']
}),
typescript(),
2022-03-24 09:28:15 +00:00
nodeResolve(),
2020-09-30 04:14:53 +00:00
commonjs(),
production && terser()
]
};