rollup-plugin-serve icon indicating copy to clipboard operation
rollup-plugin-serve copied to clipboard

{open} option not working in a specific way of conditional plugins execution

Open foretoo opened this issue 5 years ago • 0 comments

in all cases below server works, but doesnt open browser in case:

plugins: [
  process.env.BUILD === 'production' && terser(),
  process.env.BUILD === 'development' && (
    serve({ open: true, contentBase: 'build'  }),
    livereload('build')
  )
]

and opens in these:

plugins: [
  process.env.BUILD === 'production' && terser(),
  process.env.BUILD === 'development' && (
    serve({ open: true, contentBase: 'build'  })
  )
]
plugins: [
  process.env.BUILD === 'production' && terser(),
  process.env.BUILD === 'development' && serve({ open: true, contentBase: 'build'  }),
  process.env.BUILD === 'development' && livereload('build')
]

foretoo avatar Sep 21 '20 15:09 foretoo