Svelte: How to build for production ready, minify and etc?!

Created on 11 Dec 2016  路  1Comment  路  Source: sveltejs/svelte

How can we build a bundle.min.js using the rollup plugin to be ready for production?

Most helpful comment

You would also use a minifier plugin such as rollup-plugin-uglify:

// rollup.config.js
import svelte from 'rollup-plugin-svelte';
import uglify from 'rollup-plugin-uglify';

export default {
  entry: 'src/index.js',
  dest: 'bundle.min.js',
  format: 'iife',
  plugins: [
    svelte(),
    uglify()
  ]
};

>All comments

You would also use a minifier plugin such as rollup-plugin-uglify:

// rollup.config.js
import svelte from 'rollup-plugin-svelte';
import uglify from 'rollup-plugin-uglify';

export default {
  entry: 'src/index.js',
  dest: 'bundle.min.js',
  format: 'iife',
  plugins: [
    svelte(),
    uglify()
  ]
};
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bestguy picture bestguy  路  3Comments

angelozehr picture angelozehr  路  3Comments

Rich-Harris picture Rich-Harris  路  3Comments

mmjmanders picture mmjmanders  路  3Comments

lnryan picture lnryan  路  3Comments