tooling-preset-web

2.0.0-beta.1 • Public • Published

tooling-preset-web

What this preset does:

  • Generate index.html and relevant assets files
  • Copy ./static/** to ./dist/**
  • CSS preprocessors (Postcss/Sass/Scss/Less/Stylus)
  • CSS extraction
  • Babel with babel-preset-latest
  • Hot reloading (Live loading fallbacks) in dev command
  • Minimize and optimize in build command
  • Auto-split vendor code and app code in build command

Install

yarn add tooling-preset-web --dev

Usage

{
  "tooling": {
    "presets": [
      "web"
    ]
  }
}

You can also use options:

{
  "tooling": {
    "presets": [
      ["web", {
        "entry": "src/index.js"
      }]
    ]
  }
}

Options

entry

Type: string
Default: index.js

Entry file.

dist

Type: string
Default: dist

Dist folder.

extract

Type: boolean
Default: true in build command

Extract CSS.

sourceMap

Type: boolean
Default: true in build command

Generate sourcemaps.

html

html-webpack-plugin options, the default value is:

{
  title: 'Tooling Preset Web: Homepage'
}

vendor

Type: boolean
Default: true in build command and only work in build command

Split vendor code and app code.

/tooling-preset-web/

    Package Sidebar

    Install

    npm i tooling-preset-web

    Weekly Downloads

    0

    Version

    2.0.0-beta.1

    License

    MIT

    Last publish

    Collaborators

    • rem