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

Rich-Harris picture Rich-Harris  路  3Comments

plumpNation picture plumpNation  路  3Comments

lnryan picture lnryan  路  3Comments

st-schneider picture st-schneider  路  3Comments

thoughtspile picture thoughtspile  路  3Comments