primefaces / primevue-nuxt-module

MIT License
70 stars 11 forks source link

importPT removing backslashes of path on Windows #58

Closed noahhorlacher closed 5 months ago

noahhorlacher commented 5 months ago

This is my nuxt.config.ts:

import path from 'path'

export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    "nuxt-primevue"
  ],
  primevue: {
    importPT: { from: path.resolve(__dirname, './presets/wind/')},
  }
})

I'm using nuxt 3.10.3, primevue 3.49.1 and nuxt-primevue 0.3.1

Nuxt throws the following error: Pre-transform error: Failed to resolve import "C:UsersMyUsernameDesktopGithubTestApppresetswind

This fixes it: import path from 'path'

export default defineNuxtConfig({ devtools: { enabled: true }, modules: [ "nuxt-primevue" ], primevue: { importPT: { from: path.resolve(__dirname, './presets/wind/').replaceAll('\', '/')}, } })

Consider updating the primevue plugin

Thank you

Lehoczky commented 5 months ago

Fixed by: https://github.com/primefaces/primevue-nuxt-module/pull/53

Lehoczky commented 5 months ago

@mertsincan could you please take a look at the linked PR? This is a very easily encountered bug for Windows users, and my fix is pretty simple.

fazrisuhada007 commented 3 months ago

thanks bro, its work for me