@best-shot/preset-web

0.14.9 • Public • Published

@best-shot/preset-web logo

A best-shot preset for web project.

npm github node

This preset includes the following packages:

  • micro-tpl-loader
  • html-webpack-plugin
  • html-add-asset-webpack-plugin
  • html-minimizer-webpack-plugin
  • webpack-subresource-integrity

Installation

npm install @best-shot/preset-web --save-dev

Usage

// example: .best-shot/config.mjs
export const config = {
  presets: ['web'],
  html: {
    // See: https://github.com/jantimon/html-webpack-plugin#options
  }
};

Options

// example: .best-shot/config.mjs
export const config = {
  presets: ['web'],
  vendors: {
    // Split Chunks
    common: ['lodash', 'axios']
  },
  html: [
    // Multiple Page Application
    {
      filename: './src/index.html',
      title: 'Hello world!'
    },
    {
      filename: './src/intro.html'
    }
  ]
};

Tips

Polyfill

This preset use global as options.babel.polyfill.

See Options in @best-shot/preset-babel

Related

Dependencies (9)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @best-shot/preset-web

    Weekly Downloads

    69

    Version

    0.14.9

    License

    MIT

    Unpacked Size

    13.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • airkro