mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 11:09:41 +00:00
Rollup for proper CLI
This commit is contained in:
32
cli/rollup.config.js
Normal file
32
cli/rollup.config.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import cjs from "@rollup/plugin-commonjs";
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
import asset from "./lib/asset-plugin.js";
|
||||
import json from "./lib/json-plugin.js";
|
||||
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
output: {
|
||||
dir: "build",
|
||||
format: "cjs",
|
||||
assetFileNames: "[name]-[hash][extname]"
|
||||
},
|
||||
plugins: [
|
||||
resolve(),
|
||||
cjs(),
|
||||
asset(),
|
||||
json(),
|
||||
terser({
|
||||
mangle: true
|
||||
})
|
||||
],
|
||||
external: [
|
||||
"os",
|
||||
"path",
|
||||
"fs",
|
||||
"worker_threads",
|
||||
"events",
|
||||
"child_process",
|
||||
"crypto"
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user