tquinlan1992-webpack-util
TypeScript icon, indicating that this package has built-in type declarations

2.0.54 • Public • Published

tquinlan1992-webpack-util and tquinlan1992-webpack-util-jest

npm Dependencies

Custom typescript wrapper around webpack

Install

  • Install with npm: npm install --save-dev tquinlan1992-webpack-util

Usage

Build
  • run with tquinlan1992-webpack-util
Config.json path
  • The config path is relative to package.json
  • Default config path is ./tquinlan1992-webpack-util.config.json
  • To run with a different config path use the flag --config to specify the path tquinlan1992-webpack-util --config <config path>
Watch
  • Use the flag --watch or -w for the alias tquinlan1992-webpack-util --watch
Dev Server
  • To run the dev server: use the flag --devServer or -d for the alias tquinlan1992-webpack-util -devServer
    • The watch flag is ignored when using the --devServer flag

tquinlan1992-webpack-util.config.json Schema

{
    "entry": "any file with extension ['.ts', '.tsx', '.js'] for index of app",
    "appOutputFilename": "Name of bundled build javascript file",
    "appOutputPath": "build path for app and publicDirOut",
    "htmlTitle": "title of html file generated",
    "publicDirSrc": "Path of static files (environment variables are recommended for this directory)",
    "publicDirOut": "directory path relative to appOutputPath",
    "tsconfig": "path of tsconfig.json file, defaults to ./tsconfig.json relative to project root"
}

Sample tquinlan1992-webpack-util.config.json

{
    "entry": "/src/app.tsx",
    "appOutputFilename": "app.js",
    "appOutputPath": "/build",
    "htmlTitle": "Webpack",
    "publicDirSrc": "/src/public/**/*",
    "publicDirOut": "/public",
    "urlBase": "hostname",
    "port": "optional port for hostname",
    "allowedHosts": "optional hosts allowed"
}

Jest (For testing)

This is a wrapper around the Jest test with typescript/jsx configurations setup, file-loader configurations

Development env for index.js

  • #!/usr/bin/env node

Readme

Keywords

none

Package Sidebar

Install

npm i tquinlan1992-webpack-util

Weekly Downloads

3

Version

2.0.54

License

ISC

Last publish

Collaborators

  • tquinlan1992