@taqtile/ts-webpack-builder
TypeScript icon, indicating that this package has built-in type declarations

0.7.9 • Public • Published

ts-webpack-builder

A functional builder for webpack config written in Typescript.

This package was heavily inspired on webpack-blocks.

Basic usage

import {
  createConfig,
  setEntry,
  setOutput,
  setPlugin,
} from '@taqtile/ts-webpack-builder';

module.exports = createConfig([
  setEntry({
    app: './src/app.ts',
  }),
  addRule(/\.ts?$/, 'awesome-typescript-loader', [/node_modules/]),
  setOutput({
    path: root('dist/public'),
    filename: '[name].bundle.js',
    sourceMapFilename: '[name].map',
    chunkFilename: '[name].chunk.js',
  }),
  onCondition(process.env.ENV === 'development', [
    setDevServer({
      port: +process.env.PORT,
      host: process.env.HOST,
    })
  ]),
]);

Readme

Keywords

none

Package Sidebar

Install

npm i @taqtile/ts-webpack-builder

Weekly Downloads

55

Version

0.7.9

License

MIT

Unpacked Size

23.5 kB

Total Files

32

Last publish

Collaborators

  • taqtile
  • tibawatanabe