mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### 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]>
15 lines
392 B
TypeScript
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>
|
|
</>
|
|
)
|
|
}
|