diff --git a/packages/theme/layouts/default.vue b/packages/theme/layouts/default.vue index 228a569f2..814a31e63 100644 --- a/packages/theme/layouts/default.vue +++ b/packages/theme/layouts/default.vue @@ -28,13 +28,13 @@ import { useRoute, defineComponent, onMounted } from '@nuxtjs/composition-api'; import { useUser, } from '@vue-storefront/magento'; +import { useMagentoConfiguration } from '~/composables/useMagentoConfiguration'; import AppHeader from '~/components/AppHeader.vue'; import BottomNavigation from '~/components/BottomNavigation.vue'; import TopBar from '~/components/TopBar.vue'; import CartSidebar from '~/components/CartSidebar.vue'; import WishlistSidebar from '~/components/WishlistSidebar.vue'; import LoginModal from '~/components/LoginModal.vue'; -import { useMagentoConfiguration } from '~/composables/useMagentoConfiguration'; import Notification from '~/components/Notification'; import AppFooter from '~/components/AppFooter.vue'; diff --git a/packages/theme/nuxt.config.js b/packages/theme/nuxt.config.js index d2d276a5c..b06e5f881 100755 --- a/packages/theme/nuxt.config.js +++ b/packages/theme/nuxt.config.js @@ -210,37 +210,6 @@ export default { }), }), ], - extend(cfg, ctx) { - // eslint-disable-next-line no-param-reassign - cfg.devtool = ctx.isClient ? 'eval-source-map' : 'inline-source-map'; - - if (ctx && ctx.isClient) { - // eslint-disable-next-line no-param-reassign - cfg.optimization = { - ...cfg.optimization, - mergeDuplicateChunks: true, - splitChunks: { - ...cfg.optimization.splitChunks, - automaticNameDelimiter: '.', - chunks: 'all', - enforceSizeThreshold: 50_000, - maxAsyncRequests: 30, - maxInitialRequests: 30, - cacheGroups: { - ...cfg.optimization.splitChunks.cacheGroups, - vendor: { - test: /[/\\]node_modules[/\\]/, - reuseExistingChunk: true, - name: (module) => `${module - .context - .match(/[/\\]node_modules[/\\](.*?)([/\\]|$)/)[1] - .replace(/[.@_]/gm, '')}`, - }, - }, - }, - }; - } - }, extractCSS: { allChunks: true, },