2.0.3 • Published 5 months ago

nx-linaria v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

nx-linaria

npm version

A Nx Webpack plugin for enabling 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:

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:

{
  "presets": [
    [
      "@nrwl/react/babel",
      {
        "runtime": "automatic"
      }
    ],
    "@wyw-in-js"
  ],
  "plugins": []
}
2.0.3

5 months ago

2.0.2

5 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.1.0

1 year ago

1.0.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago