Files
3ed96f92cb feat: Introduce lightningcss-loader for webpack users (#61327)
### What?

I'm recreating a PR because CI of
https://github.com/vercel/next.js/pull/58712 uses `[email protected].0`
for an unknown reason.

Add an opt-in feature to use `lightningcss` instead of webpack
css-loader.

### Why?

In the name of performance.

### How?


This PR is largely based on https://github.com/fz6m/lightningcss-loader
by @fz6m.
(Thank you for nice work)

Closes PACK-1998
Closes PACK-2124

---------

Co-authored-by: OJ Kwon <[email protected]>
2024-03-06 17:07:53 +01:00

15 lines
392 B
TypeScript

import styles from './style.module.css'
export default function Page() {
console.log('CSSModules.styles', styles)
return (
<>
<p className={`search-keyword ${styles.blue}`}>hello world</p>
<div className={`${styles.blue}`}>
<div className="nested">Red due to nesting</div>
</div>
<div className="red-text">This text should be red.</div>
</>
)
}