-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.js
More file actions
57 lines (55 loc) · 2.09 KB
/
webpack.common.js
File metadata and controls
57 lines (55 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const WorkboxPlugin = require('workbox-webpack-plugin');
const WebpackPwaManifest = require('webpack-pwa-manifest');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
const path = require('path');
module.exports = {
entry: [
'./abvcss/style.sass',
'./src/index.js'
],
plugins: [
new HtmlWebpackPlugin({
title: 'abvCSS - CSS-methgodology & framework',
template: 'index-template.html',
filename: '../index-intermediate.html',
minify: {
collapseWhitespace: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true
},
hash: false
}),
new ScriptExtHtmlWebpackPlugin({
preload: /\.js$/,
defaultAttribute: 'async'
}),
new WebpackPwaManifest({
name: 'abvCSS Methodology and Framework',
short_name: 'abvCSS Methodology and Framework',
description: 'abvCSS is a CSS-methodology and framework for creating modern, dynamic and supported web interfaces',
background_color: '#ffffff',
crossorigin: 'use-credentials', //can be null, use-credentials or anonymous
inject: false,
fingerprints: false,
publicPath: '/dist',
icons: [
{
src: path.resolve('img/abvCSS-icon.png'),
sizes: [96, 128, 192, 256, 384, 512], // multiple sizes
destination: 'auto',
}
]
}),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: '[name].css',
chunkFilename: '[id].css'
})
]
};