search

Home  >  Q&A  >  body text

javascript - Gulp package import file path switching between production environment and development environment

gulp uglify is packaged for js, css and other files introduced in some sources html dist Directory, please tell me how to do it. You can easily switch the path of importing these packaged files in the development environment and production environment

I have the following questions, I hope you can help me out~

    Does the code
  1. html

    on git introduce the packaged path or the previous one?

  2. How to change the path after packaging? At which step do you do this?

怪我咯怪我咯2698 days ago909

reply all(2)I'll reply

  • 黄舟

    黄舟2017-06-27 09:21:16

    You can use this plug-in to replace js and css files in html
    gulp-html-replace

    https://www.npmjs.com/package...

    reply
    0
  • 黄舟

    黄舟2017-06-27 09:21:16

    Are production and local gulp packaged in different packages?

    This requires adding tasks to gulpfile.js (one task for production and testing)

    reply
    0
  • Cancelreply