mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-11 13:28:19 +00:00
Compare commits
25
Commits
1.3.0
...
site-fixes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
457a2d1766 | ||
|
|
8679e10aaa | ||
|
|
e1ee65bc23 | ||
|
|
1e6b96db3d | ||
|
|
5c52182778 | ||
|
|
1fde1f1c1a | ||
|
|
dada0a8297 | ||
|
|
fa09963bf8 | ||
|
|
cc53931091 | ||
|
|
86b3ddfdca | ||
|
|
f1360e1d9b | ||
|
|
e2df99b883 | ||
|
|
aed7aeaa72 | ||
|
|
11ff82b056 | ||
|
|
25d96b7ec0 | ||
|
|
10962ce51b | ||
|
|
7dfbd21bce | ||
|
|
b18f27ea8d | ||
|
|
5e6186ff70 | ||
|
|
acb947a770 | ||
|
|
e9bec8e6f8 | ||
|
|
4ea3561788 | ||
|
|
76c1b0caa9 | ||
|
|
f2eab2c30a | ||
|
|
3fc90467a3 |
@@ -13,7 +13,7 @@ on:
|
||||
type: string
|
||||
tag:
|
||||
description: NPM tag
|
||||
default: 'next' # set to latest after v1 release
|
||||
default: 'latest'
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
@@ -56,11 +56,11 @@ jobs:
|
||||
'lucide-react-native',
|
||||
'lucide-preact',
|
||||
'lucide-solid',
|
||||
'angular',
|
||||
'astro',
|
||||
'icons',
|
||||
'svelte',
|
||||
'vue',
|
||||
'@lucide/angular',
|
||||
'@lucide/astro',
|
||||
'@lucide/icons',
|
||||
'@lucide/svelte',
|
||||
'@lucide/vue',
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -74,20 +74,16 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Set new version
|
||||
run: pnpm version --new-version ${{ needs.prepare.outputs.VERSION }} --no-git-tag-version
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
run: pnpm --fail-if-no-match --filter ${{ matrix.package }} version --new-version ${{ needs.prepare.outputs.VERSION }} --no-git-tag-version
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
run: pnpm --filter ${{ matrix.package }} build
|
||||
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
run: pnpm --filter ${{ matrix.package }} test
|
||||
|
||||
- name: Publish
|
||||
run: pnpm publish --access public --no-git-checks --ignore-scripts --tag ${{ inputs.tag }}
|
||||
working-directory: packages/${{ matrix.package }}
|
||||
run: pnpm --filter ${{ matrix.package }} publish --access public --no-git-checks --ignore-scripts --tag ${{ inputs.tag }}
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
|
||||
|
||||
@@ -27,8 +27,10 @@ packages/**/src/dynamicIconImports.ts
|
||||
packages/**/DynamicIcon.d.ts
|
||||
packages/**/dynamicIconImports.js
|
||||
packages/**/dynamicIconImports.d.ts
|
||||
packages/**/dynamicIconImports.d.mts
|
||||
packages/**/dynamicIconImports.js.map
|
||||
packages/**/dynamic.d.ts
|
||||
packages/**/dynamic.d.mts
|
||||
packages/**/dynamic.mjs.map
|
||||
packages/**/dynamic.mjs
|
||||
packages/**/LICENSE
|
||||
|
||||
+16
-115
@@ -9,6 +9,7 @@ import { resourcesSidebar } from './sidebar/resources';
|
||||
import getStructuredData from './getStructuredData';
|
||||
import { createGeneralOGImage, createIconOGImage } from './createOGImage';
|
||||
import llmstxt from 'vitepress-plugin-llms';
|
||||
import getHead from './getHead';
|
||||
|
||||
const defaultSandpackCSS = await readFile(
|
||||
fileURLToPath(new URL('./theme/sandpack-default.css', import.meta.url)),
|
||||
@@ -76,121 +77,7 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
},
|
||||
head: [
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'preconnect',
|
||||
href: 'https://analytics.lucide.dev',
|
||||
},
|
||||
],
|
||||
[
|
||||
'script',
|
||||
{
|
||||
src: 'https://analytics.lucide.dev/js/script.js',
|
||||
'data-domain': 'lucide.dev',
|
||||
defer: '',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:locale',
|
||||
content: 'en_US',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:site_name',
|
||||
content: title,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:title',
|
||||
content: socialTitle,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:description',
|
||||
content: description,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:url',
|
||||
content: 'https://lucide.dev',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image',
|
||||
content: 'https://lucide.dev/og.png',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:width',
|
||||
content: '1200',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:height',
|
||||
content: '630',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:type',
|
||||
content: 'image/png',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:card',
|
||||
content: 'summary_large_image',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:title',
|
||||
content: socialTitle,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:description',
|
||||
content: description,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:image',
|
||||
content: 'https://lucide.dev/og.png',
|
||||
},
|
||||
],
|
||||
],
|
||||
head: getHead({ title, socialTitle, description }),
|
||||
async transformPageData(pageData) {
|
||||
pageData.frontmatter.head ??= [];
|
||||
if (
|
||||
@@ -218,6 +105,20 @@ export default defineConfig({
|
||||
if (ogPath) {
|
||||
const content = `https://lucide.dev${ogPath}`;
|
||||
pageData.frontmatter.head.push(
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:title',
|
||||
content: pageData.title,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:description',
|
||||
content: pageData.description,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
"order": 6,
|
||||
"icon": "angular",
|
||||
"docsAlias": "angular",
|
||||
"packageDirname": "angular",
|
||||
"shields": [
|
||||
{
|
||||
"alt": "npm",
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
import { HeadConfig } from "vitepress"
|
||||
|
||||
interface GetHeadOptions {
|
||||
title: string;
|
||||
socialTitle: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
const brandColor = '#f56565'
|
||||
|
||||
const getHead = ({ title, socialTitle, description }: GetHeadOptions): HeadConfig[] => [
|
||||
// Favicons and meta tags
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
name: 'robots',
|
||||
content: 'index,follow',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
name: 'theme-color',
|
||||
content: brandColor,
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'shortcut icon',
|
||||
href: '/favicon.ico',
|
||||
sizes: 'any',
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'icon',
|
||||
href: '/favicon.svg',
|
||||
type: 'image/svg+xml',
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'apple-touch-icon',
|
||||
href: '/apple-touch-icon.png',
|
||||
sizes: '180x180',
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'icon',
|
||||
type: 'image/png',
|
||||
href: '/favicon-32x32.png',
|
||||
sizes: '32x32',
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'icon',
|
||||
type: 'image/png',
|
||||
href: '/favicon-16x16.png',
|
||||
sizes: '16x16',
|
||||
},
|
||||
],
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'mask-icon',
|
||||
href: '/safari-pinned-tab.svg',
|
||||
color: brandColor,
|
||||
},
|
||||
],
|
||||
// Analytics
|
||||
[
|
||||
'link',
|
||||
{
|
||||
rel: 'preconnect',
|
||||
href: 'https://analytics.lucide.dev',
|
||||
},
|
||||
],
|
||||
[
|
||||
'script',
|
||||
{
|
||||
src: 'https://analytics.lucide.dev/js/script.js',
|
||||
'data-domain': 'lucide.dev',
|
||||
defer: '',
|
||||
},
|
||||
],
|
||||
// Open Graph and Twitter Card meta tags
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:locale',
|
||||
content: 'en_US',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:site_name',
|
||||
content: title,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:title',
|
||||
content: socialTitle,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:description',
|
||||
content: description,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:url',
|
||||
content: 'https://lucide.dev',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image',
|
||||
content: 'https://lucide.dev/og.png',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:width',
|
||||
content: '1200',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:height',
|
||||
content: '630',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:type',
|
||||
content: 'image/png',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'og:image:alt',
|
||||
content: 'Lucide icon library preview image',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:card',
|
||||
content: 'summary_large_image',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:site',
|
||||
content: '@lucide_icons',
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:title',
|
||||
content: socialTitle,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:description',
|
||||
content: description,
|
||||
},
|
||||
],
|
||||
[
|
||||
'meta',
|
||||
{
|
||||
property: 'twitter:image',
|
||||
content: 'https://lucide.dev/og.png',
|
||||
},
|
||||
],
|
||||
]
|
||||
|
||||
export default getHead
|
||||
@@ -29,8 +29,12 @@ export default async function getStructuredData(iconName: string, pageData: Page
|
||||
name: iconName,
|
||||
// TODO: Add support for description extraction from icon metadata
|
||||
// description: 'An ...SVG icon from the Lucide icon set.',
|
||||
contentUrl: `https://lucide.dev/api/icons/${iconName}}?width=24&height=24&background=white`,
|
||||
thumbnailUrl: `https://lucide.dev/api/icons/${iconName}}?width=256&height=256&background=white`,
|
||||
contentUrl: `https://lucide.dev/api/icons/${iconName}?width=24&height=24&background=white`,
|
||||
thumbnailUrl: `https://lucide.dev/api/icons/${iconName}?width=256&height=256&background=white`,
|
||||
acquireLicensePage: 'https://lucide.dev/license',
|
||||
license: 'https://lucide.dev/license',
|
||||
copyrightNotice: 'Copyright (c) 2026 Lucide Icons and Contributors',
|
||||
creditText: 'Lucide Icons',
|
||||
encodingFormat: 'image/svg+xml',
|
||||
keywords: pageData.params?.tags,
|
||||
width: 24,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"kemie",
|
||||
"ericfennis",
|
||||
"karsa-mistmere",
|
||||
"jguddas"
|
||||
],
|
||||
"tags": [
|
||||
"food",
|
||||
"dish",
|
||||
"restaurant",
|
||||
"course",
|
||||
"meal",
|
||||
"meat",
|
||||
"bbq",
|
||||
"steak",
|
||||
"vegetarian"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M11.771 6.109a2.5 2.5 0 0 1 3.12 3.12" />
|
||||
<path d="M17.852 12.185a6.5 6.5 0 0 0-9.035-9.04" />
|
||||
<path d="M18.013 18.013C15.029 20.349 10.831 22 7 22a3 3 0 0 1-2.68-1.66L2.4 16.5" />
|
||||
<path d="m18.5 6 2.19 4.5a6.48 6.48 0 0 1-.139 4.393" />
|
||||
<path d="m2 2 20 20" />
|
||||
<path d="M6.355 6.37a7 7 0 0 0-.075.23c-1.1 3.13-.78 3.9-3.18 6.08A3 3 0 0 0 5 18c3.356 0 6.993-1.267 9.85-3.151" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 608 B |
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"karsa-mistmere",
|
||||
"ericfennis",
|
||||
"csandman",
|
||||
"TonySullivan"
|
||||
],
|
||||
"tags": [
|
||||
"location",
|
||||
"navigation",
|
||||
"travel",
|
||||
"waypoint",
|
||||
"marker",
|
||||
"drop"
|
||||
],
|
||||
"categories": [
|
||||
"text",
|
||||
"navigation",
|
||||
"travel",
|
||||
"account"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M 12.248 21.969 a 1 1 0 0 1 -0.849 -0.17 C 9.539 20.193 4 14.993 4 10 a 8 8 0 0 1 16 0 C 20 10.42 19.961 10.841 19.888 11.262" />
|
||||
<path d="m22 22-1.88-1.88" />
|
||||
<circle cx="12" cy="10" r="3" />
|
||||
<circle cx="18" cy="18" r="3" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 451 B |
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"kongsgard"
|
||||
],
|
||||
"tags": [
|
||||
"signal",
|
||||
"broadcast",
|
||||
"connectivity",
|
||||
"live",
|
||||
"frequency"
|
||||
],
|
||||
"categories": [
|
||||
"devices",
|
||||
"multimedia",
|
||||
"social"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M10.4103 10.7852C10.1529 11.1218 10 11.5425 10 11.999C10 13.1036 10.8954 13.999 12 13.999C12.5077 13.999 12.9713 13.8098 13.324 13.498" />
|
||||
<path d="M16.1992 7.80078C17.4739 9.07549 18.0422 10.8109 17.9039 12.5134" />
|
||||
<path d="M19.0996 4.89844C22.0892 7.88804 22.7871 12.2879 21.1932 15.936" />
|
||||
<path d="M2 2L22 22" />
|
||||
<path d="M4.89961 19.0984C0.999609 15.1984 0.999609 8.79844 4.89961 4.89844" />
|
||||
<path d="M7.79922 16.1992C5.66828 14.0683 5.51165 10.6498 7.32931 8.25" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 702 B |
@@ -3,7 +3,7 @@
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"karsa-mistmere",
|
||||
"KnarliX"
|
||||
"RajnishKMehta"
|
||||
],
|
||||
"tags": [
|
||||
"cybersecurity",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"contributors": [
|
||||
"colebemis",
|
||||
"karsa-mistmere",
|
||||
"KnarliX"
|
||||
"RajnishKMehta"
|
||||
],
|
||||
"tags": [
|
||||
"cybersecurity",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"Youya-ui"
|
||||
],
|
||||
"tags": [
|
||||
"footwear",
|
||||
"sports",
|
||||
"running",
|
||||
"athletic",
|
||||
"shoe",
|
||||
"sneaker",
|
||||
"training",
|
||||
"exercise",
|
||||
"fitness"
|
||||
],
|
||||
"categories": [
|
||||
"sports"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m15 10.42 4.8-5.07" />
|
||||
<path d="M19 18h3" />
|
||||
<path d="M9.5 22 21.414 9.415A2 2 0 0 0 21.2 6.4l-5.61-4.208A1 1 0 0 0 14 3v2a2 2 0 0 1-1.394 1.906L8.677 8.053A1 1 0 0 0 8 9c-.155 6.393-2.082 9-4 9a2 2 0 0 0 0 4h14" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1,4 @@
|
||||
// This file is make sure that we can import from "lucide-react/dynamic" without having to specify the extension. This is a workaround for the fact that some bundlers (like Webpack) don't support importing from "lucide-react/dynamic.mjs" without specifying the extension.
|
||||
// Unfortunately, we can't use exports field in package.json because it breaks some runtime environments. See https://github.com/lucide-icons/lucide/issues/2743#issuecomment-2626784300
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
export * from './dynamic.mjs';
|
||||
@@ -29,17 +29,20 @@
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist",
|
||||
"dynamic.js",
|
||||
"dynamic.mjs",
|
||||
"dynamic.js.map",
|
||||
"dynamic.d.mts",
|
||||
"dynamic.d.ts",
|
||||
"dynamicIconImports.mjs",
|
||||
"dynamicIconImports.js.map",
|
||||
"dynamicIconImports.d.ts"
|
||||
"dynamicIconImports.d.ts",
|
||||
"dynamicIconImports.d.mts"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm typecheck && pnpm build:bundles",
|
||||
"copy:license": "cp ../../LICENSE ./LICENSE",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts && rm -f dynamic.* && rm -f dynamicIconImports.d.ts",
|
||||
"clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.ts && rm -f dynamic.{d.ts,d.mts,mts,mjs,mjs.map} && rm -f dynamicIconImports.d.ts",
|
||||
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mts --renderUniqueKey --withAliases --withDynamicImports --separateAliasesFile --separateAliasesFileIgnore=fingerprint --aliasesFileExtension=.ts --iconFileExtension=.ts --exportFileName=index.ts",
|
||||
"build:bundles": "rollup -c ./rollup.config.mjs",
|
||||
"typecheck": "tsc",
|
||||
|
||||
@@ -21,13 +21,19 @@ const bundles = [
|
||||
outputDir: 'dist/esm',
|
||||
preserveModules: true,
|
||||
},
|
||||
|
||||
{
|
||||
format: 'esm',
|
||||
inputs: ['src/dynamicIconImports.ts', 'src/DynamicIcon.ts', ...aliasesEntries],
|
||||
outputDir: 'dist/esm',
|
||||
external: [/src/],
|
||||
preserveModules: true,
|
||||
paths: (id) => {
|
||||
if (id.match(/src/)) {
|
||||
const [, modulePath] = id.match(/src\/(.*)\.ts/);
|
||||
|
||||
return `./${modulePath}.js`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
format: 'esm',
|
||||
@@ -63,7 +69,7 @@ const configs = bundles
|
||||
...plugins({ pkg, minify }),
|
||||
// Make sure we emit "use client" directive to make it compatible with Next.js
|
||||
preserveDirectives({
|
||||
include: ['src/DynamicIcon.ts', 'src/context.ts', 'src/Icon.ts'],
|
||||
include: ['src/lucide-react.ts', 'src/DynamicIcon.ts', 'src/context.ts', 'src/Icon.ts'],
|
||||
suppressPreserveModulesWarning: true,
|
||||
}),
|
||||
],
|
||||
@@ -100,6 +106,11 @@ export default [
|
||||
file: `dynamicIconImports.d.ts`,
|
||||
format: 'es',
|
||||
},
|
||||
// Extra declaration file with .d.mts extension for better compatibility with ESM environments
|
||||
{
|
||||
file: `dynamicIconImports.d.mts`,
|
||||
format: 'es',
|
||||
},
|
||||
],
|
||||
plugins: [dts()],
|
||||
},
|
||||
@@ -110,6 +121,11 @@ export default [
|
||||
file: `dynamic.d.ts`,
|
||||
format: 'es',
|
||||
},
|
||||
// Extra declaration file with .d.mts extension for better compatibility with ESM environments
|
||||
{
|
||||
file: `dynamic.d.mts`,
|
||||
format: 'es',
|
||||
},
|
||||
],
|
||||
plugins: [dts()],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user