Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: allow to modularize icon imports #99

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 19 additions & 0 deletions packages/frosted-ui-icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ function MyComponent() {
}
```

## Configuring

### next.js

```js
// next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
modularizeImports: {
'@frosted-ui/icons': {
transform: '@frosted-ui/icons/{{member}}',
skipDefaultConversion: true,
},
},
};

export default nextConfig;
```

## Contributing

Please follow our [contributing guidelines](./CONTRIBUTING.md).
Expand Down
12 changes: 11 additions & 1 deletion packages/frosted-ui-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frosted-ui/icons",
"private": false,
"version": "0.0.1-canary.2",
"version": "0.0.1-canary.3",
"license": "MIT",
"description": "Frosted UI React Icons",
"main": "./dist/cjs/index.js",
Expand All @@ -17,6 +17,16 @@
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
}
},
"./*": {
"require": {
"types": "./dist/cjs/*.d.ts",
"default": "./dist/cjs/*.js"
},
"import": {
"types": "./dist/esm/*.d.ts",
"default": "./dist/esm/*.js"
}
}
},
"files": [
Expand Down
Loading