2020-02-03 10:24:25 +01:00
|
|
|
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"
|
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-08-26 18:03:30 +02:00
|
|
|
const lodash_fp_exports = ["isEmpty"]
|
|
|
|
|
2019-08-19 22:18:23 +02:00
|
|
|
export default {
|
2020-02-03 10:24:25 +01:00
|
|
|
input: "src/index.js",
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: "dist/index.js",
|
|
|
|
format: "esm",
|
|
|
|
name: "budibaseStandardComponents",
|
2020-08-12 18:41:12 +02:00
|
|
|
sourcemap: true,
|
2020-02-03 10:24:25 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
plugins: [
|
2020-10-15 10:04:57 +02:00
|
|
|
// Only run terser in production environments
|
|
|
|
production && terser(),
|
2020-08-12 18:41:12 +02:00
|
|
|
postcss({
|
|
|
|
plugins: [],
|
|
|
|
}),
|
2020-02-03 10:24:25 +01:00
|
|
|
svelte({
|
|
|
|
hydratable: true,
|
|
|
|
}),
|
2020-05-07 23:15:09 +02:00
|
|
|
resolve({
|
|
|
|
browser: true,
|
|
|
|
}),
|
2020-08-26 18:03:30 +02:00
|
|
|
commonjs({
|
|
|
|
namedExports: {
|
|
|
|
"lodash/fp": lodash_fp_exports,
|
|
|
|
},
|
|
|
|
}),
|
2020-02-03 10:24:25 +01:00
|
|
|
],
|
|
|
|
}
|