FAQ
Common problems when using PXD across bundlers and style setups, with their fixes.
Failed to resolve import "xxx" from xxx
Strict package managers such as pnpm do not hoist dependencies of pxd. Add a .npmrc to the project root and reinstall:
shamefully-hoist=trueNo loader is configured for ".vue" files
Triggered by imports such as:
import AccessibilityIcon from '@gdsicon/vue/accessibility'@gdsicon/vue publishes raw .vue sources, and Vite does not pre-bundle .vue files imported from JavaScript inside a dependency. Exclude it from dependency optimization:
// vite.config.js
import { defineConfig } from 'vite'
export default defineConfig({
optimizeDeps: {
exclude: ['@gdsicon/vue'],
},
}):active styles do not apply in mobile Safari
Mobile Safari skips :active until the document has handled a touch event — see this explanation. Attach an empty handler on body:
<body ontouchstart=""></body>