You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
884 B
34 lines
884 B
import commonjs from '@rollup/plugin-commonjs'; |
|
import postcss from 'rollup-plugin-postcss'; |
|
import { nodeResolve } 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(), |
|
nodeResolve(), |
|
commonjs(), |
|
production && terser() |
|
] |
|
};
|
|
|