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

mmjmanders picture mmjmanders  路  3Comments

plumpNation picture plumpNation  路  3Comments

robnagler picture robnagler  路  3Comments

AntoninBeaufort picture AntoninBeaufort  路  3Comments

clitetailor picture clitetailor  路  3Comments