Skip to content

Commit 9338c88

Browse files
author
luke-kim
committed
feat: add useLightningcss option (default: true) to enable Lightning CSS
1 parent df3be20 commit 9338c88

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/nextjs-plugin/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const withStyleX =
139139
ctx.dir,
140140
getSupportedBrowsers(ctx.dir, ctx.dev),
141141
undefined,
142-
false
142+
pluginOptions?.useLightningcss ?? true
143143
);
144144
return lazyPostCSSPromise;
145145
};
@@ -252,4 +252,4 @@ const withStyleX =
252252
export default withStyleX;
253253

254254
module.exports = withStyleX;
255-
module.exports.default = withStyleX;
255+
module.exports.default = withStyleX;

packages/webpack-plugin/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export interface StyleXPluginOption extends Pick<StyleXWebpackLoaderOptions, 'tr
6868
* @example [/node_modules/]
6969
*/
7070
exclude?: (string | RegExp)[];
71+
useLightningcss?: boolean;
7172
}
7273
export type StyleXWebpackLoaderOptions = {
7374
stylexImports: StyleXOptions['importSources'];

0 commit comments

Comments
 (0)