Add common loader, such as raw-loader
juristr opened this issue · 0 comments
juristr commented
Not sure whether to add this directly or just add like a docs folder where the configuration of such common loaders is described. Or better even, just point to the official webpack docs.
Remember, I'd like to keep the starter as lean as possible and only just add the most common ones.
Configuration of raw-loader
$ npm install raw-loader --save-dev
const path = require('path');
const webpack = require('webpack');
const ROOT = path.resolve( __dirname, 'src' );
module.exports = {
module: {
rules: [
// Raw loader (for HTML for instance)
{
test: /\.html$/,
loader: 'raw-loader',
exclude: [ path.resolve( ROOT, 'index.html' ) ]
}
]
}
...
};