UNPKG

@strapi/strapi

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite

45 lines (41 loc) 1.86 kB
'use strict'; var adminViteSingletonModules = require('./admin-vite-singleton-modules.js'); /** * Modules given explicit Vite resolve aliases (and included in resolve.dedupe) for the admin bundle. * Single source of truth for resolution contract tests. * * @internal */ const ADMIN_VITE_ALIAS_MODULES = [ 'react', 'react-dom', 'react-router-dom', 'styled-components', 'react-redux', '@reduxjs/toolkit', '@strapi/design-system', '@radix-ui/react-tooltip', 'lodash', 'invariant', 'prismjs', // react-dnd holds its DndContext in module scope, and @strapi/admin and // @strapi/content-manager each declare react-dnd@16.0.1 themselves. npm hoisting collapses // those onto one copy, so the DndProvider rendered by @strapi/admin's AuthenticatedLayout and // the useDragLayer call in the content-manager layout share a context only by accident of // hoisting. Any tree that keeps the copies separate (pnpm's strict isolation, // install-strategy=nested, a plugin pinning its own react-dnd) gives them two different // contexts and the Content Manager crashes on mount with // "Invariant Violation: Expected drag drop context" (#22392, #22792). 'react-dnd', 'react-dnd-html5-backend' ]; /** * Modules passed to Vite resolve.dedupe (and aliased): the admin alias modules plus the * CodeMirror singletons, so every copy collapses onto a single runtime instance. */ const ADMIN_VITE_DEDUPE_MODULES = [ ...ADMIN_VITE_ALIAS_MODULES, ...adminViteSingletonModules.ADMIN_VITE_SINGLETON_MODULES ]; exports.ADMIN_VITE_SINGLETON_MODULES = adminViteSingletonModules.ADMIN_VITE_SINGLETON_MODULES; exports.ADMIN_VITE_ALIAS_MODULES = ADMIN_VITE_ALIAS_MODULES; exports.ADMIN_VITE_DEDUPE_MODULES = ADMIN_VITE_DEDUPE_MODULES; //# sourceMappingURL=admin-vite-alias-modules.js.map