From 84f86da2faab3af73e3a55ab576ca14a0d38259e Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Mon, 27 Mar 2023 08:37:44 +0530 Subject: Automatic conversion of import statements into dynamic imports. --- config/webpack/plugins/create-manifest-webpack-plugin/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config/webpack/plugins/create-manifest-webpack-plugin') diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index 77f5959..4ab363f 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -38,12 +38,14 @@ class CreateManifestPlugin { const resources = []; for (const assetName in assets) { - if (/^assets\/.*\.(jpg|png|gif)$/.test(assetName)) + if (/^assets\/.*\.(jpg|png|gif)$/.test(assetName)) { resources.push(assetName); + } } - for (const sharedModule of sharedModules) - resources.push(`shared/${sharedModule}.js`); + for (const sharedModule of sharedModules) { + resources.push(`shared/${getFileNameHash(sharedModule)}.js`); + } if (resources.length > 0) { manifest.web_accessible_resources = [ -- cgit v1.2.3