Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graxmonzo/nx-linaria
A Nx Webpack plugin for enabling Linaria loader for babel projects.
https://github.com/graxmonzo/nx-linaria
babel linaria nx react webpack
Last synced: 26 days ago
JSON representation
A Nx Webpack plugin for enabling Linaria loader for babel projects.
- Host: GitHub
- URL: https://github.com/graxmonzo/nx-linaria
- Owner: GraxMonzo
- License: mit
- Created: 2023-03-05T23:06:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-21T15:32:07.000Z (5 months ago)
- Last Synced: 2024-10-11T23:04:28.659Z (26 days ago)
- Topics: babel, linaria, nx, react, webpack
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/nx-linaria
- Size: 2.01 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nx-linaria
[![npm version](https://img.shields.io/npm/v/nx-linaria?style=flat-square)](https://www.npmjs.com/package/nx-linaria)
> A [Nx](https://nx.dev/) Webpack plugin for enabling [Linaria](https://github.com/callstack/linaria) loader for babel projects.
# Installation
Add the plugin to your workspace:
```
npm i -D nx-linaria @linaria/core @linaria/react @wyw-in-js/babel-preset
```_Compose the plugin in Webpack config:_
```ts
import { composePlugins, withNx } from "@nx/webpack";
import { withReact } from "@nx/react";
import { withLinaria } from "nx-linaria";export default composePlugins(
withNx(),
withReact(),
withLinaria(),
(config) => {
return config;
}
);
```_Include Linaria's babel preset in `.babelrc`:_
```json
{
"presets": [
[
"@nx/react/babel",
{
"runtime": "automatic"
}
],
"@wyw-in-js"
],
"plugins": []
}
```