mirror of
https://github.com/Qortal/emoji-picker-js.git
synced 2025-02-14 19:25:50 +00:00
35 lines
870 B
JavaScript
35 lines
870 B
JavaScript
|
import commonjs from 'rollup-plugin-commonjs';
|
||
|
import postcss from 'rollup-plugin-postcss';
|
||
|
import resolve from 'rollup-plugin-node-resolve';
|
||
|
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(),
|
||
|
resolve(),
|
||
|
commonjs(),
|
||
|
production && terser()
|
||
|
]
|
||
|
};
|