v2.1.4
What changed
Global installs
Even though we strongly advise against global installs, since they break treeshaking,
you can now globally install icons utilizing the default export.
It's as simple as:
import { createApp } from 'vue'
import App from './App.vue'
let app = createApp(App)
app.use(PhosphorIcons)
app.mount('#app')
closes #34
Compact build
Some users have complained that the library may cause build systems to open up too many files at once, causing the build to crash.
For that, we've now added a compact
build, that bundles all icons into one file.
Instead of importing the icons from @phosphor-icons/vue
you'll need to import icons from @phosphor-icons/vue/compact
Important: For your project to be able to resolve the compact types and modules, make sure that "moduleResolution": "nodenext",
is set in your tsconfig.json
Why do we use two separate builds, isn't the compact build enough?
No, since many bundlers can not yet reliably tree-shake modules if they exist in the same file, we have to separate out every Icon into a different file. This is fine, but some build systems might have environmental restrictions such as
Netlify
that prevent the build script to open up too many files at once
closes #35