How to get webpack and iis express to work together?

后端 未结 4 2182
傲寒
傲寒 2021-02-20 07:12

I have Angular 2 and Webpack 2 starter which run on node by webpack-dev-server, and I what to run it from visual studio with web-api.

The problem is when angular2-webpa

4条回答
  •  情话喂你
    2021-02-20 07:23

    The accepted answer is for version 1. If you are using version 2 you can use a vue template to get you started.

    Based on the existing vue-templates I made a vue template you can install with vue-cli. This template jumpstarts you for a vue application you can extend with or integrate in you existing environment.

    npm install -g vue-cli
    vue init delcon/webpack-simple
    cd my-project
    npm install
    

    devwatch:

    This template has an additional run devwatch option that watches for filechanges instead of using the webpack-dev-server. This makes it usable for any existing webserver enviroment. It uses livereload to update your browser on changes.

    npm run devwatch
    

    dev:

    to run it with the default webpack-dev-server, remove in index.html:

    npm run dev
    

    build:

    to build your project for production:

    npm run build
    

提交回复
热议问题