budibase/packages/standard-components/rollup.config.js

39 lines
821 B
JavaScript
Raw Normal View History

import svelte from "rollup-plugin-svelte"
import resolve from "rollup-plugin-node-resolve"
2020-05-07 23:15:09 +02:00
import commonjs from "@rollup/plugin-commonjs"
import postcss from "rollup-plugin-postcss"
2020-10-12 18:54:18 +02:00
import { terser } from "rollup-plugin-terser"
2019-08-19 22:18:23 +02:00
const production = !process.env.ROLLUP_WATCH
2020-11-04 15:22:04 +01:00
const lodash_fp_exports = ["isEmpty"]
2019-08-19 22:18:23 +02:00
export default {
input: "src/index.js",
output: [
{
file: "dist/index.js",
format: "esm",
name: "budibaseStandardComponents",
sourcemap: true,
},
],
plugins: [
// Only run terser in production environments
production && terser(),
postcss({
plugins: [],
}),
svelte({
hydratable: true,
}),
2020-05-07 23:15:09 +02:00
resolve({
browser: true,
}),
commonjs({
namedExports: {
"lodash/fp": lodash_fp_exports,
},
}),
],
}