See also:
Topic

webpack

JavaScript module bundler
3/10/2020

Server-side rendering with code splitting

How to implement server-side rendering with code splitting?

Server-side rendering makes your website faster for users and search engines. In addition to this, not all crawlers can run JavaScript, so search engines and social platforms may not index or process the content of the website.

Read more
3/9/2020

Creating a JavaScript library with webpack

How to bundle a JavaScript library with webpack?

Webpack is a great tool for bundling JavaScript libraries.

The typical webpack.config.js used by a library looks something like this:

const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'main.js',
    libraryTarget: 'commonjs'
  },
  externals: { ... }
};
Read more