Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5ada6c

Browse files
committed
Do not run server on build
1 parent 6eea325 commit c5ada6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyscriptjs/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import typescript from "@rollup/plugin-typescript";
88
import css from "rollup-plugin-css-only";
99
import serve from 'rollup-plugin-serve'
1010

11-
const production = !process.env.ROLLUP_WATCH;
11+
const production = !process.env.ROLLUP_WATCH || (process.env.NODE_ENV === "production");
1212

1313
function serve_() {
1414
let server;
@@ -68,7 +68,7 @@ export default {
6868
!production && serve(),
6969
!production && livereload("public"),
7070
production && terser(),
71-
serve({
71+
!production && serve({
7272
port: 8080,
7373
contentBase: 'examples'}
7474
)

0 commit comments

Comments
 (0)