generate manifest and compress images
This commit is contained in:
parent
37b43fb216
commit
4dc7d943ec
@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"copy-webpack-plugin": "^5.1.0",
|
"copy-webpack-plugin": "^5.1.1",
|
||||||
"elm-webpack-loader": "^6.0.1",
|
"elm-webpack-loader": "^6.0.1",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
|
"imagemin-webpack-plugin": "^2.4.2",
|
||||||
"jsdom": "^15.2.1",
|
"jsdom": "^15.2.1",
|
||||||
"prerender-spa-plugin": "^3.4.0",
|
"prerender-spa-plugin": "^3.4.0",
|
||||||
"tempy": "^0.3.0",
|
"tempy": "^0.3.0",
|
||||||
"terser-webpack-plugin": "^2.3.0",
|
"terser-webpack-plugin": "^2.3.1",
|
||||||
"webpack": "^4.41.2",
|
"webpack": "^4.41.4",
|
||||||
"webpack-cli": "^3.3.10",
|
"webpack-cli": "^3.3.10",
|
||||||
|
"webpack-manifest-plugin": "^2.2.0",
|
||||||
"workbox-webpack-plugin": "^4.3.1"
|
"workbox-webpack-plugin": "^4.3.1"
|
||||||
},
|
},
|
||||||
"name": "wand-front-utils",
|
"name": "wand-front-utils",
|
||||||
|
1932
pnpm-lock.yaml
generated
1932
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,8 @@ const PrerenderSPAPlugin = require('prerender-spa-plugin')
|
|||||||
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer
|
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer
|
||||||
const CopyPlugin = require('copy-webpack-plugin')
|
const CopyPlugin = require('copy-webpack-plugin')
|
||||||
const { InjectManifest } = require('workbox-webpack-plugin')
|
const { InjectManifest } = require('workbox-webpack-plugin')
|
||||||
|
const ManifestPlugin = require('webpack-manifest-plugin')
|
||||||
|
const ImageminPlugin = require('imagemin-webpack-plugin').default
|
||||||
const { JSDOM } = require('jsdom')
|
const { JSDOM } = require('jsdom')
|
||||||
const tempy = require('tempy')
|
const tempy = require('tempy')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
@ -27,8 +29,7 @@ const jsMin = {
|
|||||||
mangle: true,
|
mangle: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports =
|
module.exports = {
|
||||||
{
|
|
||||||
output: {
|
output: {
|
||||||
filename: "main.js",
|
filename: "main.js",
|
||||||
path: path.join(__dirname, "dist"),
|
path: path.join(__dirname, "dist"),
|
||||||
@ -45,6 +46,13 @@ module.exports =
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new ManifestPlugin(),
|
||||||
|
new ImageminPlugin({
|
||||||
|
disable: false,
|
||||||
|
pngquant: {
|
||||||
|
quality: '95-100'
|
||||||
|
}
|
||||||
|
}),
|
||||||
new TerserPlugin({
|
new TerserPlugin({
|
||||||
terserOptions: jsMin,
|
terserOptions: jsMin,
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user