2020-05-07 23:15:09 +02:00
|
|
|
import commonjs from "@rollup/plugin-commonjs"
|
2020-11-17 13:08:24 +01:00
|
|
|
import resolve from "@rollup/plugin-node-resolve"
|
2020-11-18 20:18:18 +01:00
|
|
|
// import replace from "@rollup/plugin-replace"
|
2020-11-17 13:08:24 +01:00
|
|
|
import svelte from "rollup-plugin-svelte"
|
2020-08-12 18:41:12 +02:00
|
|
|
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
|
|
|
|
2020-10-15 10:04:57 +02:00
|
|
|
const production = !process.env.ROLLUP_WATCH
|
2020-11-18 20:18:18 +01:00
|
|
|
const externals = ["svelte", "svelte/internal"]
|
2020-08-26 18:03:30 +02:00
|
|
|
|
2019-08-19 22:18:23 +02:00
|
|
|
export default {
|
2020-11-18 20:18:18 +01:00
|
|
|
external: externals,
|
2020-02-03 10:24:25 +01:00
|
|
|
input: "src/index.js",
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: "dist/index.js",
|
|
|
|
format: "esm",
|
|
|
|
name: "budibaseStandardComponents",
|
2020-11-17 13:08:24 +01:00
|
|
|
sourcemap: false,
|
2020-02-03 10:24:25 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
plugins: [
|
2020-10-15 10:04:57 +02:00
|
|
|
production && terser(),
|
2020-11-17 13:08:24 +01:00
|
|
|
postcss(),
|
2020-02-03 10:24:25 +01:00
|
|
|
svelte({
|
2020-11-17 13:08:24 +01:00
|
|
|
dev: !production,
|
2020-02-03 10:24:25 +01:00
|
|
|
}),
|
2020-05-07 23:15:09 +02:00
|
|
|
resolve({
|
|
|
|
browser: true,
|
2020-11-18 20:18:18 +01:00
|
|
|
skip: externals,
|
2020-05-07 23:15:09 +02:00
|
|
|
}),
|
2020-11-17 13:08:24 +01:00
|
|
|
commonjs(),
|
|
|
|
// Fix for https://github.com/sveltejs/svelte/issues/3165
|
2020-11-18 20:18:18 +01:00
|
|
|
// replace({
|
|
|
|
// "outros.c.push":
|
|
|
|
// "if (outros === undefined) { block.o(local); return }\noutros.c.push",
|
|
|
|
// }),
|
2020-02-03 10:24:25 +01:00
|
|
|
],
|
|
|
|
}
|