mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-23 09:00:31 +00:00
fix: preserveEntrySignatures
This commit is contained in:
parent
ee279635ba
commit
38d08540b2
@ -152,7 +152,7 @@ export const componentsChunkPlugin = createUnplugin((options: ComponentChunkOpti
|
|||||||
config.build.rollupOptions = config.build.rollupOptions || {}
|
config.build.rollupOptions = config.build.rollupOptions || {}
|
||||||
config.build.rollupOptions.output = config.build.rollupOptions.output || {}
|
config.build.rollupOptions.output = config.build.rollupOptions.output || {}
|
||||||
config.build.rollupOptions.input = config.build.rollupOptions.input || {}
|
config.build.rollupOptions.input = config.build.rollupOptions.input || {}
|
||||||
|
config.build.rollupOptions.preserveEntrySignatures = 'strict'
|
||||||
for (const component of components) {
|
for (const component of components) {
|
||||||
if (component.mode === 'client' || component.mode === 'all') {
|
if (component.mode === 'client' || component.mode === 'all') {
|
||||||
// (config.build.lib.entry as Record<string, string>)[component.pascalName] = await resolvePath(component.filePath)
|
// (config.build.lib.entry as Record<string, string>)[component.pascalName] = await resolvePath(component.filePath)
|
||||||
@ -181,7 +181,7 @@ export const componentsChunkPlugin = createUnplugin((options: ComponentChunkOpti
|
|||||||
if (chunkInfo.type !== 'chunk') { continue }
|
if (chunkInfo.type !== 'chunk') { continue }
|
||||||
|
|
||||||
for (const component of components) {
|
for (const component of components) {
|
||||||
if (chunkInfo.facadeModuleId) {
|
if (chunkInfo.facadeModuleId && chunkInfo.exports.length > 0) {
|
||||||
const { pathname } = parseURL(decodeURIComponent(pathToFileURL(chunkInfo.facadeModuleId).href))
|
const { pathname } = parseURL(decodeURIComponent(pathToFileURL(chunkInfo.facadeModuleId).href))
|
||||||
const isPath = await resolvePath(component.filePath) === pathname
|
const isPath = await resolvePath(component.filePath) === pathname
|
||||||
if (isPath) {
|
if (isPath) {
|
||||||
|
Loading…
Reference in New Issue
Block a user