diff --git a/nuxt-vite.config.js b/nuxt-vite.config.js index fab1bf9fb..75c0233be 100644 --- a/nuxt-vite.config.js +++ b/nuxt-vite.config.js @@ -221,6 +221,9 @@ export default { }, alias: { 'primevue/utils': path.resolve(__dirname, './components/lib/utils/Utils.js'), + 'primevue/config': path.resolve(__dirname, './components/lib/config/PrimeVue.js'), + 'primevue/styled': path.resolve(__dirname, './components/lib/styled/PrimeVueStyled.js'), + 'primevue/unstyled': path.resolve(__dirname, './components/lib/unstyled/PrimeVueUnstyled.js'), 'primevue/api': path.resolve(__dirname, './components/lib/api/Api.js'), ...STYLE_ALIAS, ...THEME_ALIAS, diff --git a/rollup.config.js b/rollup.config.js index 7258cdfc8..a113c8934 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -229,6 +229,8 @@ const CORE_DEPENDENCIES = { 'primevue/utils': 'primevue.utils', 'primevue/api': 'primevue.api', 'primevue/config': 'primevue.config', + 'primevue/styled': 'primevue.styled', + 'primevue/unstyled': 'primevue.unstyled', 'primevue/base': 'primevue.base', 'primevue/usestyle': 'primevue.usestyle', ...CORE_STYLE_DEPENDENCIES, @@ -309,7 +311,7 @@ const TERSER_PLUGIN_OPTIONS = { const PLUGINS = [vue(), postcss(POSTCSS_PLUGIN_OPTIONS), babel(BABEL_PLUGIN_OPTIONS)]; function addEntry(folder, inFile, outFile) { - const exports = inFile === 'PrimeVue.js' || folder === 'passthrough/tailwind' ? 'named' : 'auto'; + const exports = inFile.startsWith('PrimeVue') || folder === 'passthrough/tailwind' ? 'named' : 'auto'; const useCorePlugin = Object.keys(GLOBAL_COMPONENT_DEPENDENCIES).some((d) => d.replace('primevue/', '') === folder); const plugins = PLUGINS; const external = EXTERNAL_COMPONENT; @@ -500,6 +502,8 @@ function addDirectives() { function addConfig() { addEntry('config', 'PrimeVue.js', 'config'); + addEntry('styled', 'PrimeVueStyled.js', 'primevuestyled'); + addEntry('unstyled', 'PrimeVueUnstyled.js', 'primevueunstyled'); } function addPassThrough() {