mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-18 03:29:17 +00:00
Cache correct assets (#887)
* Cache correct assets * Update lib/entry-data-plugin.js Co-authored-by: Surma <surma@surma.dev> * Actually commit the fix this time Co-authored-by: Surma <surma@surma.dev>
This commit is contained in:
@@ -31,6 +31,7 @@ import featurePlugin from './lib/feature-plugin';
|
||||
import initialCssPlugin from './lib/initial-css-plugin';
|
||||
import serviceWorkerPlugin from './lib/sw-plugin';
|
||||
import dataURLPlugin from './lib/data-url-plugin';
|
||||
import entryDataPlugin from './lib/entry-data-plugin';
|
||||
|
||||
function resolveFileUrl({ fileName }) {
|
||||
return JSON.stringify(fileName.replace(/^static\//, '/'));
|
||||
@@ -116,6 +117,7 @@ export default async function ({ watch }) {
|
||||
commonjs(),
|
||||
resolve(),
|
||||
replace({ __PRERENDER__: false, __PRODUCTION__: isProduction }),
|
||||
entryDataPlugin(),
|
||||
isProduction ? terser({ module: true }) : {},
|
||||
],
|
||||
preserveEntrySignatures: false,
|
||||
|
||||
Reference in New Issue
Block a user