rails/actioncable/rollup.config.js
Wolfgang Fournès 33e5ce5fce remove unknown rollup input option breakOnWarning
As seen in https://buildkite.com/rails/rails/builds/104749#018d92dc-79b9-42bc-9a8c-bbcf5681f9eb/1165-1176 breakOnWarning does not seem to be a valid option for Rollup. I cannot find in the documentation, and therefore I think it can safely be removed.
2024-02-10 14:05:39 +01:00

47 lines
873 B
JavaScript

import resolve from "@rollup/plugin-node-resolve"
import { terser } from "rollup-plugin-terser"
const terserOptions = {
mangle: false,
compress: false,
format: {
beautify: true,
indent_level: 2
}
}
export default [
{
input: "app/javascript/action_cable/index.js",
output: [
{
file: "app/assets/javascripts/actioncable.js",
format: "umd",
name: "ActionCable"
},
{
file: "app/assets/javascripts/actioncable.esm.js",
format: "es"
}
],
plugins: [
resolve(),
terser(terserOptions)
]
},
{
input: "app/javascript/action_cable/index_with_name_deprecation.js",
output: {
file: "app/assets/javascripts/action_cable.js",
format: "umd",
name: "ActionCable"
},
plugins: [
resolve(),
terser(terserOptions)
]
},
]