Webpack with an array provided as config

前端 未结 2 714
粉色の甜心
粉色の甜心 2021-02-05 02:06

In this webpack starter kit https://github.com/webpack/react-starter I see the webpack.production.config.js module does not export only a config object but an array of config ob

2条回答
  •  执笔经年
    2021-02-05 02:31

    Can be used to produce two different outputs - otherwise undoable in Webpack (AFAIK).

    Eg: Produce full Production-ready output config into wwwroot directory in an ASP.Net Server-side web app, so that you can run and test everything by running the ASP.Net app on IIS, in Visual Studio WHILE SIMULTANEOUSLY Produce a simple HTML page (with HtmlWebpackPlugin) into your_app/dist folder, so you can run just the JS app and on Webpack DevServer and edit the JS app, in VSCode

    Two people could work side by side on the same project, at the same time, the way John Lennon Imagined...

提交回复
热议问题