How to specify a `plugin` and `loader` option when use `cli` ?

This is my shell.

rm -rf ./dist


webpack ${src}app.js ${dist}[name].[hash].js -d

the compile result:

dulin@dulindeiMac:~/workspace/webpack-summer/cli (master*%%=) %% ./
Hash: 1e422073cff599da8ba3
Version: webpack 1.13.1
Time: 55ms
                           Asset     Size  Chunks             Chunk Names
    main.1e422073cff599da8ba3.js  1.61 kB       0  [emitted]  main  1.45 kB       0  [emitted]  main
   [0] ./src/app.js 0 bytes {0} [built]

I want to use htmlWebpackPlugin to generate html file.
So, how to use it with cli.

I know the webpack.config.js file is better solution, but I want to know how to do this with cli.

Author: Fantashit

1 thought on “How to specify a `plugin` and `loader` option when use `cli` ?

  1. > webpack index.js index-browser.js -p --module-bind=babel-loader


    > webpack index.js index-browser.js -p --module-bind='js=babel-loader?presets[]=es2015'

Comments are closed.