tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.45k stars 1.28k forks source link

nuxt3 build 'direct import' errors with import from @heroicons/vue/outline in vue component #643

Closed oliviermills closed 2 years ago

oliviermills commented 2 years ago

dev works fine, but breaks on build for nuxt v3

image

This repo is the base sample from vercel nuxt3 (works fine until you try @heroicons clone https://github.com/oliviermills/test-nuxt3

  1. yarn install
  2. yarn build
  3. yarn start (to run the build)
arnauddoub commented 2 years ago

same problem

arnauddoub commented 2 years ago

if you replace this import import { AtSymbolIcon, PhoneIcon } from '@heroicons/vue/outline' by import { AtSymbolIcon, PhoneIcon } from '@heroicons/vue/outline/esm/index.js' its work

reinink commented 2 years ago

Hey folks! This appears to be a duplicate of issue #564, which includes a couple solutions on how to fix this 👍