Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lucide-solid): compilation issues when starting up Vite Dev server #2375

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/guide/packages/lucide-solid.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ const App = () => {
export default App;
```

Vite loading/performing issues with the dev server can be resolved by import icons directly from the `lucide-solid/icons` directory:

```jsx
import Camera from 'lucide-solid/icons/camera';

// Usage
const App = () => {
return <Camera color="red" size={48} />;
};

export default App;
```

## Props

| name | type | default |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"svgson": "^5.3.1",
"yargs": "^17.7.2"
},
"packageManager": "pnpm@8.14.0+sha256.9cebf61abd83f68177b29484da72da9751390eaad46dfc3072d266bfbb1ba7bf",
"packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247",
"pnpm": {
"packageExtensions": {
"vue-template-compiler": {
Expand Down
18 changes: 17 additions & 1 deletion packages/lucide-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@
"browser": "./dist/esm/lucide-solid.js",
"require": "./dist/cjs/lucide-solid.js",
"node": "./dist/cjs/lucide-solid.js"
},
"./icons": {
"types": "./dist/types/lucide-solid.d.ts",
"solid": "./dist/source/lucide-solid.jsx",
"import": "./dist/esm/lucide-solid.js",
"browser": "./dist/esm/lucide-solid.js",
"require": "./dist/cjs/lucide-solid.js",
"node": "./dist/cjs/lucide-solid.js"
},
"./icons/*": {
"types": "./dist/types/icons/*.d.ts",
"solid": "./dist/source/icons/*.jsx",
"import": "./dist/esm/icons/*.js",
"browser": "./dist/esm/icons/*.js",
"require": "./dist/cjs/icons/*.js",
"node": "./dist/cjs/icons/*.js"
}
},
"sideEffects": false,
Expand All @@ -48,7 +64,7 @@
"build:transpile": "tsc --jsx preserve -t es2020 --rootDir src --outDir dist --noEmit false",
"build:version": "node ./scripts/replaceVersion.mjs",
"build:bundle": "rollup -c rollup.config.mjs",
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --aliasesFileExtension=.ts --iconFileExtension=.tsx --exportFileName=index.ts",
"build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --renderUniqueKey --withAliases --separateAliasesFile --aliasesFileExtension=.ts --iconFileExtension=.tsx --exportFileName=index.ts",
"test": "pnpm build:icons && vitest run",
"version": "pnpm version --git-tag-version=false"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/lucide-solid/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ const bundles = [
format: 'cjs',
inputs,
outputDir,
preserveModules: true
},
{
format: 'esm',
inputs,
outputDir,
preserveModules: true
},
];

Expand Down
Loading
Loading