2021-07-27 06:57:42 +08:00
|
|
|
import resolve from "@rollup/plugin-node-resolve"
|
|
|
|
import commonjs from "@rollup/plugin-commonjs"
|
2023-11-07 10:55:06 +08:00
|
|
|
import { terser } from "rollup-plugin-terser"
|
2021-07-27 06:57:42 +08:00
|
|
|
|
2023-11-07 10:55:06 +08:00
|
|
|
const terserOptions = {
|
|
|
|
mangle: false,
|
|
|
|
compress: false,
|
|
|
|
format: {
|
|
|
|
beautify: true,
|
|
|
|
indent_level: 2
|
|
|
|
}
|
2021-08-13 17:10:05 +08:00
|
|
|
}
|
2023-11-07 10:55:06 +08:00
|
|
|
|
|
|
|
export default [
|
|
|
|
{
|
|
|
|
input: "app/javascript/actiontext/index.js",
|
|
|
|
output: {
|
|
|
|
file: "app/assets/javascripts/actiontext.js",
|
|
|
|
format: "umd",
|
|
|
|
name: "ActionText"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
terser(terserOptions)
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
input: "app/javascript/actiontext/index.js",
|
|
|
|
output: {
|
|
|
|
file: "app/assets/javascripts/actiontext.esm.js",
|
|
|
|
format: "es"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
terser(terserOptions)
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|