2020-02-03 10:24:25 +01:00
|
|
|
import svelte from "rollup-plugin-svelte"
|
|
|
|
import postcss from "rollup-plugin-postcss"
|
|
|
|
import resolve from "rollup-plugin-node-resolve"
|
2020-02-27 23:06:35 +01:00
|
|
|
import commonjs from "rollup-plugin-commonjs"
|
2020-01-28 14:00:05 +01:00
|
|
|
|
|
|
|
const postcssOptions = () => ({
|
|
|
|
extensions: [".scss", ".sass"],
|
|
|
|
extract: false,
|
|
|
|
minimize: true,
|
|
|
|
use: [
|
|
|
|
[
|
|
|
|
"sass",
|
|
|
|
{
|
2020-02-03 10:24:25 +01:00
|
|
|
includePaths: ["./node_modules"],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
})
|
2020-01-27 11:59:56 +01:00
|
|
|
|
2020-03-05 15:55:34 +01:00
|
|
|
const coreExternal = ["shortid"]
|
2020-02-27 23:06:35 +01:00
|
|
|
|
2020-01-27 11:59:56 +01:00
|
|
|
export default {
|
2020-01-28 14:00:05 +01:00
|
|
|
input: "src/index.js",
|
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: "dist/index.js",
|
|
|
|
format: "esm",
|
|
|
|
name: "budibaseStandardComponents",
|
2020-04-14 15:15:32 +02:00
|
|
|
sourcemap: true,
|
2020-02-03 10:24:25 +01:00
|
|
|
},
|
2020-01-28 14:00:05 +01:00
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
svelte({
|
2020-02-03 10:24:25 +01:00
|
|
|
hydratable: true,
|
2020-01-28 14:00:05 +01:00
|
|
|
}),
|
2020-02-27 23:06:35 +01:00
|
|
|
resolve({
|
|
|
|
preferBuiltins: true,
|
|
|
|
browser: true,
|
|
|
|
dedupe: importee => {
|
|
|
|
return coreExternal.includes(importee)
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
commonjs({
|
|
|
|
namedExports: {
|
|
|
|
shortid: ["generate"],
|
|
|
|
},
|
|
|
|
}),
|
2020-02-03 10:24:25 +01:00
|
|
|
postcss(postcssOptions()),
|
|
|
|
],
|
|
|
|
}
|