const autoprefixer = require('autoprefixer');
const htmlWebpackTemplate = require('html-webpack-template');
const commonRules = [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(scss|sass)$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: function () {
return [autoprefixer];
},
},
},
'sass-loader',
],
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
];
const htmlCommonConfig = {
inject: false,
template: htmlWebpackTemplate,
appMountId: 'app',
mobile: true,
headHtmlSnippet: `
`,
title: 'Timeline',
};
module.exports = {
commonRules,
htmlCommonConfig,
};