4.15.4 • Published 7 months ago

@design-systems/next-esm-css v4.15.4

Weekly downloads
10,584
License
MIT
Repository
github
Last release
7 months ago

@design-systems/next-esm-css

This package enables using the esm output from the ds build command in a Next.js based project. Currently Next.js doesn't allow node_modules to import their own CSS so using components from a ds based project doesn't work. See this issue.

Installation

npm i @design-systems/next-esm-css
# or with yarn
yarn add @design-systems/next-esm-css

Usage

Simply require this package in your next.config.js and provide either a list of package names or a regex for everything in your design system scope.

next.config.js:

const withEsmCss = require('@design-systems/next-esm-css')([
  '@your-design-system-scope/.*',
]);

module.exports = withEsmCss();

Now Next.js won't break when you import a component build with ds!

Inspration

This package heavily borrows from next-transpiled-modules. You could use that package instead, but this package is a bit faster when building since it only affects CSS.

4.15.4

9 months ago

4.15.3

9 months ago

5.0.0-next.0

7 months ago

4.16.0-next.0

7 months ago

4.15.2

1 year ago

4.15.1

2 years ago

4.15.0

2 years ago

4.14.0

2 years ago

4.13.1

3 years ago

4.13.0

3 years ago

4.12.0

3 years ago

2.18.0

3 years ago

2.17.8

3 years ago

2.17.7

3 years ago

2.17.6

3 years ago

2.17.4

3 years ago

2.17.5

3 years ago

2.17.3

3 years ago

2.17.2

3 years ago

2.17.1

3 years ago

2.17.0

3 years ago

2.16.0

3 years ago

2.15.2

3 years ago

2.15.0

3 years ago

2.15.1

3 years ago

2.14.0

3 years ago

2.13.0

3 years ago

2.12.3

3 years ago

2.12.2

3 years ago

2.12.1

3 years ago

2.12.0

3 years ago

2.11.0

3 years ago

2.10.1

3 years ago

2.10.0

3 years ago

2.9.1

3 years ago

2.9.0

3 years ago

2.8.3

3 years ago

2.8.2

3 years ago

2.8.1

3 years ago

2.8.0

4 years ago

2.7.5

4 years ago

2.7.4

4 years ago

2.7.3

4 years ago

2.7.2

4 years ago

2.7.1

4 years ago

2.7.0

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago