New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build when use primevue #374
Comments
Same error! Have you found a solution? |
no solution yet, still searching |
try adding these aliases: // vite.config.ts/vite.config.js
resolve: {
alias: {
'primevue/config': 'primevue/config/config.cjs.js',
'primevue/api': 'primevue/api/api.cjs.js',
}
}, |
almost worked, but im facing a different problems now with the icons |
This is the workaround I figured out for a working import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import resolve from "@rollup/plugin-node-resolve";
const customResolver = resolve({
extensions: [".esm.js", ".css", ".scss"]
});
export default defineConfig({
plugins: [
vue(),
],
ssgOptions: {
script: "async",
formatting: "prettify",
},
resolve: {
alias: [
{
find: "primevue",
customResolver: customResolver,
replacement: function(alias) {
return alias;
}
}
]
},
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hello guys, I'm currently facing a problem where I installed primevue for my project and I'm unable to create the build when I run vite-ssg build it gives the following error bellow. Unfortunately I didn't find a similiar problem searching in forums and I also tried adding in my vite.config.ts in the ssrOptions the esm formart, but it didn't work.
Does anyone has any ideia how could I solve this?
Reproduction
Add primevue in the vite project, when run the build with vite-ssg it thorws the error
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: