webpack-hud

0.1.2 • Public • Published

Webpack HUD, displaying errors in app

Webpack TypeScript demo

Usage

npm i --save-dev webpack-hud
module.exports = {
  entry: {
    main: [
      "webpack-hud", // <-- put package here, before your code
      "./src/main",
    ],
  },
  output: {
    filename: "bundle.js",
    path: "build/",
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        loader: "awesome-typescript-loader",
        exclude: /node_modules/,
      },
    ],
  },
  resolve: {
    extensions: [".tsx", ".ts", ".js"],
  },
};

How does it work?

I copied the code to started another Sockjs channel listening to Webpack compilation results. And an element is appended to the <body /> to display the content.

Develop

cd example/
../node_modules/.bin/webpack-dev-server --hot-only --hot

License

MIT

Package Sidebar

Install

npm i webpack-hud

Weekly Downloads

75

Version

0.1.2

License

MIT

Unpacked Size

138 kB

Total Files

9

Last publish

Collaborators

  • jiyinyiyong