From 9b8b47bde07004d042adb41bbf4aa64de08437c7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Scherbinin Date: Tue, 5 Dec 2023 12:01:05 +0700 Subject: [PATCH] Removed dev in production build config --- rollup.config.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index b0c41ad5..2bec1290 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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(), @@ -26,8 +13,7 @@ const plugins = [ babel({ exclude: "node_modules/**", }), - dev && serve(serveopts), - !dev && terser(), + terser(), ]; export default [ @@ -37,6 +23,6 @@ export default [ dir: "dist", format: "es", }, - plugins: [...plugins], + plugins, }, ];