Skip to content

Commit

Permalink
Removed dev in production build config
Browse files Browse the repository at this point in the history
  • Loading branch information
gentslava committed Dec 5, 2023
1 parent 3bc4d01 commit 9b8b47b
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,8 @@ import commonjs from "rollup-plugin-commonjs";
import nodeResolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import { terser } from "rollup-plugin-terser";
import serve from "rollup-plugin-serve";
import json from "@rollup/plugin-json";

const dev = process.env.ROLLUP_WATCH;

const serveopts = {
contentBase: ["./dist"],
host: "0.0.0.0",
port: 5000,
allowCrossOrigin: true,
headers: {
"Access-Control-Allow-Origin": "*",
},
};

const plugins = [
nodeResolve({}),
commonjs(),
Expand All @@ -26,8 +13,7 @@ const plugins = [
babel({
exclude: "node_modules/**",
}),
dev && serve(serveopts),
!dev && terser(),
terser(),
];

export default [
Expand All @@ -37,6 +23,6 @@ export default [
dir: "dist",
format: "es",
},
plugins: [...plugins],
plugins,
},
];

0 comments on commit 9b8b47b

Please sign in to comment.