mirror of
1
2
Fork 0
ucaptcha/rollup.config.js

30 lines
675 B
JavaScript
Raw Normal View History

import {terser} from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
2020-03-15 09:05:18 +01:00
const isProd = process.env.NODE_ENV === 'production';
2020-03-15 09:05:18 +01:00
const typescriptOptions = {include: ['src/**/*']};
2020-03-15 09:05:18 +01:00
if (!isProd) typescriptOptions.noEmitOnError = false;
module.exports = {
input: 'src/client/client.js',
2020-03-15 09:05:18 +01:00
plugins: [
commonjs(),
resolve(),
isProd && terser({
mangle: {
properties: {
// Anything that is not in quotes is mangled
keep_quoted: "strict"
}
}
})
2020-03-15 09:05:18 +01:00
],
output: {
file: 'dist/client/bundle.js',
name: 'ucaptcha',
format: 'iife'
2020-03-15 09:05:18 +01:00
}
};