generate manifest and compress images
This commit is contained in:
parent
37b43fb216
commit
4dc7d943ec
@ -1,14 +1,16 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"copy-webpack-plugin": "^5.1.0",
|
||||
"copy-webpack-plugin": "^5.1.1",
|
||||
"elm-webpack-loader": "^6.0.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"imagemin-webpack-plugin": "^2.4.2",
|
||||
"jsdom": "^15.2.1",
|
||||
"prerender-spa-plugin": "^3.4.0",
|
||||
"tempy": "^0.3.0",
|
||||
"terser-webpack-plugin": "^2.3.0",
|
||||
"webpack": "^4.41.2",
|
||||
"terser-webpack-plugin": "^2.3.1",
|
||||
"webpack": "^4.41.4",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-manifest-plugin": "^2.2.0",
|
||||
"workbox-webpack-plugin": "^4.3.1"
|
||||
},
|
||||
"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 CopyPlugin = require('copy-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 tempy = require('tempy')
|
||||
const fs = require('fs')
|
||||
@ -27,8 +29,7 @@ const jsMin = {
|
||||
mangle: true,
|
||||
}
|
||||
|
||||
module.exports =
|
||||
{
|
||||
module.exports = {
|
||||
output: {
|
||||
filename: "main.js",
|
||||
path: path.join(__dirname, "dist"),
|
||||
@ -45,6 +46,13 @@ module.exports =
|
||||
}],
|
||||
},
|
||||
plugins: [
|
||||
new ManifestPlugin(),
|
||||
new ImageminPlugin({
|
||||
disable: false,
|
||||
pngquant: {
|
||||
quality: '95-100'
|
||||
}
|
||||
}),
|
||||
new TerserPlugin({
|
||||
terserOptions: jsMin,
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user