budibase/packages/client/rollup.config.js

39 lines
772 B
JavaScript
Raw Normal View History

import commonjs from "@rollup/plugin-commonjs"
import resolve from "@rollup/plugin-node-resolve"
import builtins from "rollup-plugin-node-builtins"
import svelte from "rollup-plugin-svelte"
const production = !process.env.ROLLUP_WATCH
2019-09-06 14:04:23 +02:00
export default {
input: "src/index.js",
output: [
{
2020-11-18 12:24:01 +01:00
sourcemap: true,
format: "iife",
name: "app",
file: `./dist/budibase-client.js`,
},
{
file: "dist/budibase-client.esm.mjs",
format: "esm",
sourcemap: "inline",
},
],
plugins: [
svelte({
dev: !production,
}),
resolve({
preferBuiltins: true,
browser: true,
dedupe: ["svelte", "svelte/internal"],
}),
2020-08-06 22:12:35 +02:00
commonjs(),
builtins(),
],
watch: {
clearScreen: false,
},
}