2020-11-17 13:08:24 +01:00
|
|
|
import alias from "@rollup/plugin-alias"
|
|
|
|
import commonjs from "@rollup/plugin-commonjs"
|
|
|
|
import resolve from "@rollup/plugin-node-resolve"
|
2020-02-03 10:24:25 +01:00
|
|
|
import builtins from "rollup-plugin-node-builtins"
|
2020-11-13 16:42:32 +01:00
|
|
|
import svelte from "rollup-plugin-svelte"
|
|
|
|
import path from "path"
|
|
|
|
|
|
|
|
const production = !process.env.ROLLUP_WATCH
|
|
|
|
const projectRootDir = path.resolve(__dirname)
|
2019-09-06 14:04:23 +02:00
|
|
|
|
|
|
|
export default {
|
2020-02-03 10:24:25 +01:00
|
|
|
input: "src/index.js",
|
|
|
|
output: [
|
|
|
|
{
|
2020-11-17 13:08:24 +01:00
|
|
|
file: "dist/budibase-client.js",
|
2020-02-03 10:24:25 +01:00
|
|
|
format: "esm",
|
|
|
|
sourcemap: "inline",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
plugins: [
|
2020-11-13 16:42:32 +01:00
|
|
|
alias({
|
|
|
|
entries: [
|
|
|
|
{
|
|
|
|
find: "@budibase/component-sdk",
|
|
|
|
replacement: path.resolve(
|
|
|
|
projectRootDir,
|
|
|
|
"../component-sdk/dist/budibase-component-sdk"
|
|
|
|
),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
svelte({
|
|
|
|
dev: !production,
|
|
|
|
}),
|
2020-02-03 10:24:25 +01:00
|
|
|
resolve({
|
|
|
|
preferBuiltins: true,
|
|
|
|
browser: true,
|
|
|
|
}),
|
2020-08-06 22:12:35 +02:00
|
|
|
commonjs(),
|
2020-02-03 10:24:25 +01:00
|
|
|
builtins(),
|
|
|
|
],
|
|
|
|
watch: {
|
|
|
|
clearScreen: false,
|
|
|
|
},
|
|
|
|
}
|