-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
30 lines (27 loc) · 908 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const StylexPlugin = require("@stylexjs/webpack-plugin");
const path = require("path");
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
config.plugins = config.plugins || [];
config.plugins.push(
new StylexPlugin({
// filename: 'styles.css',
// get webpack mode and set value for dev
dev: config.mode === "development",
// Required for CSS variable support
appendTo: (name) => name.endsWith(".css"),
filename: path.join(__dirname, "app", "stylex-bundle.css"),
unstable_moduleResolution: {
// The module system to be used.
// Use this value when using `ESModules`.
type: "commonJS",
// The absolute path to the root directory of your project.
rootDir: __dirname,
},
}),
);
return config;
},
};
module.exports = nextConfig;