October 2017
Intermediate to advanced
458 pages
11h 13m
English
We now have only one problem left: our debug HTML is referencing scripts/bundles/some-bundle.js while our production build is referencing scripts/some-bundle.js. Additionally, we would like to replace some CSS files with the all.css file we created. We can replace patterns in our HTML using the gulp-html-replace module (https://www.npmjs.com/package/gulp-html-replace). For more generic string replacement, check out gulp-replace (https://www.npmjs.com/package/gulp-replace):
npm install gulp-replace --save-devnpm install gulp-html-replace --save-dev
All we have to do now is edit our views and indicate the parts we want to replace. This is from the index.html file:
<head> <meta charset="UTF-8"> <title>CI Web Shop</title> ...
Read now
Unlock full access