1 import svelte from 'rollup-plugin-svelte';
 
   2 import commonjs from '@rollup/plugin-commonjs';
 
   3 import resolve from '@rollup/plugin-node-resolve';
 
   4 import livereload from 'rollup-plugin-livereload';
 
   5 import { terser } from 'rollup-plugin-terser';
 
   6 import css from 'rollup-plugin-css-only';
 
   8 const production = !process.env.ROLLUP_WATCH;
 
  14                 if (server) server.kill(0);
 
  20                         server = require('child_process').spawn('yarn', ['start', '-d'], {
 
  21                                 stdio: ['ignore', 'inherit', 'inherit'],
 
  25                         process.on('SIGTERM', toExit);
 
  26                         process.on('exit', toExit);
 
  37                 file: 'dist/build/bundle.js'
 
  42                                 // enable run-time checks when not in production
 
  46                 // we'll extract any component CSS out into
 
  47                 // a separate file - better for performance
 
  48                 css({ output: 'bundle.css' }),
 
  50                 // If you have external dependencies installed from
 
  51                 // npm, you'll most likely need these plugins. In
 
  52                 // some cases you'll need additional configuration -
 
  53                 // consult the documentation for details:
 
  54                 // https://github.com/rollup/plugins/tree/master/packages/commonjs
 
  61                 // In dev mode, call `npm run start` once
 
  62                 // the bundle has been generated
 
  63                 !production && serve(),
 
  65                 // Watch the `dist` directory and refresh the
 
  66                 // browser on changes when not in production
 
  67                 !production && livereload('dist'),
 
  69                 // If we're building for production (npm run build
 
  70                 // instead of npm run dev), minify
 
  71                 production && terser()