rsnext/packages
Donny/강동윤 94771bf3cc
refactor: Add lightningcss mode for turbopack-css (#58471)
### What?

We are experimenting with `lightningcss`. This is about replacing
`swc_css` with `lightningcss` in turbopack, and the main reason for this
is to reduce the maintenance burden.
But when I tried, it introduced several regressions, so I'm putting it
behind an experimental flag.

You can enable `lightningcss` mode for **turbopack** by adding a flag to
the next config file.

```js
/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  experimental: {
    useLightningcss: true,
  },
}

module.exports = nextConfig

```

Note that this is only for turbopack because we were not using `swc_css`
for non-turbopack mode of next.js



x-ref:
https://vercel.slack.com/archives/C03EWR7LGEN/p1700025496732229?thread_ts=1700019629.866549&cid=C03EWR7LGEN


### Why?

We should avoid regressions.

### How?

---

turbopack PR: https://github.com/vercel/turbo/pull/6456


Closes PACK-1966

---------

Co-authored-by: Leah <github.leah@hrmny.sh>
2023-11-20 18:09:36 +01:00
..
create-next-app v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
eslint-config-next v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
eslint-plugin-next v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
font v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next refactor: Add lightningcss mode for turbopack-css (#58471) 2023-11-20 18:09:36 +01:00
next-bundle-analyzer v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-codemod v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-env v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-mdx v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-plugin-storybook v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-polyfill-module v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-polyfill-nomodule v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
next-swc refactor: Add lightningcss mode for turbopack-css (#58471) 2023-11-20 18:09:36 +01:00
react-dev-overlay v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
react-refresh-utils v14.0.4-canary.5 2023-11-19 23:21:38 +00:00
third-parties v14.0.4-canary.5 2023-11-19 23:21:38 +00:00