How to use the sapper/config/rollup.server function in sapper

To help you get started, we’ve selected a few sapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexdilley / sapper-serverless-template / rollup.config.js View on Github external
dev,
        hydratable: true,
        preprocess,
        emitCss: true,
      }),
      resolve({ browser: true, extensions }),
      commonjs(),
      !dev && terser({ module: true }),
    ],

    onwarn,
  },

  server: {
    input: config.server.input(),
    output: config.server.output(),
    plugins: [
      aliases,
      replace({
        ...(!dev ? { 'http://127.0.0.1': 'https://YOUR_HOSTNAME' } : {}),
        'process.browser': false,
        'process.env.NODE_ENV': JSON.stringify(mode),
      }),
      svelte({
        generate: 'ssr',
        dev,
        preprocess,
      }),
      postcss({
        minimize: true,
        extract: path.resolve(__dirname, './static/index.css'),
      }),
github alexdilley / sapper-serverless-template / rollup.config.js View on Github external
svelte({
        dev,
        hydratable: true,
        preprocess,
        emitCss: true,
      }),
      resolve({ browser: true, extensions }),
      commonjs(),
      !dev && terser({ module: true }),
    ],

    onwarn,
  },

  server: {
    input: config.server.input(),
    output: config.server.output(),
    plugins: [
      aliases,
      replace({
        ...(!dev ? { 'http://127.0.0.1': 'https://YOUR_HOSTNAME' } : {}),
        'process.browser': false,
        'process.env.NODE_ENV': JSON.stringify(mode),
      }),
      svelte({
        generate: 'ssr',
        dev,
        preprocess,
      }),
      postcss({
        minimize: true,
        extract: path.resolve(__dirname, './static/index.css'),