Add html-loader, file-loader, and clean-webpack-plugin

- Added html-loader to automatically require the files we reference in img tags
- Added file-loader to handle the svg,png,jpg,gif files from our images
- Configured file-loader to add our images to an imgs directory in dist
- Also configured it to add a hash to their filenames
- Lastly, added clean-webpack-plugin to our production config to clean out the dist directory each time we build
This commit is contained in:
Colt Steele
2019-03-05 18:13:21 -08:00
parent eb66c0dc93
commit 947290016d
6 changed files with 155 additions and 33 deletions

View File

@ -14,6 +14,8 @@
"devDependencies": {
"bootstrap": "^4.3.1",
"css-loader": "^2.1.0",
"file-loader": "^3.0.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
@ -22,5 +24,8 @@
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.2.1"
},
"dependencies": {
"clean-webpack-plugin": "^2.0.0"
}
}