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

37 lines
862 B
JavaScript
Raw Normal View History

2020-05-07 23:15:09 +02:00
import commonjs from "@rollup/plugin-commonjs"
import resolve from "@rollup/plugin-node-resolve"
import replace from "@rollup/plugin-replace"
import svelte from "rollup-plugin-svelte"
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
2019-08-19 22:18:23 +02:00
export default {
input: "src/index.js",
output: [
{
file: "dist/index.js",
format: "esm",
name: "budibaseStandardComponents",
sourcemap: false,
},
],
plugins: [
production && terser(),
postcss(),
svelte({
dev: !production,
}),
2020-05-07 23:15:09 +02:00
resolve({
browser: true,
}),
commonjs(),
// Fix for https://github.com/sveltejs/svelte/issues/3165
replace({
"outros.c.push":
"if (outros === undefined) { block.o(local); return }\noutros.c.push",
}),
],
}