Skip to content

Commit

Permalink
support next.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
taishinaritomi committed Aug 27, 2023
1 parent a1d836d commit 60e6a3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"files": [
"./**/vite.config.ts",
"./**/vitest.config.ts",
"./**/next.config.mjs",
"./**/webpack.config.mjs",
"./packages/excss/src/compiler.ts",
"./packages/excss/src/plugins/webpack/{virtualLoader,loader}.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/excss/src/plugins/next.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Variants } from "@excss/compiler";
import type { NextConfig } from "next";
import { lazyPostCSS } from "next/dist/build/webpack/config/blocks/css";
import { getGlobalCssLoader } from "next/dist/build/webpack/config/blocks/css/loaders";
import { lazyPostCSS } from "next/dist/build/webpack/config/blocks/css/index.js";
import { getGlobalCssLoader } from "next/dist/build/webpack/config/blocks/css/loaders/index.js";
import type { ConfigurationContext } from "next/dist/build/webpack/config/utils.js";
import type { Configuration, RuleSetRule } from "webpack";
import type { ExcssOption } from "./webpack/plugin.ts";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const createBundleAnalyzer = require("@next/bundle-analyzer");
const { createExcss } = require("excss/next");
import createBundleAnalyzer from "@next/bundle-analyzer";
import { createExcss } from "excss/next";

const withBundleAnalyzer = createBundleAnalyzer({
enabled: process.env["ANALYZE"] === "true",
Expand All @@ -18,4 +18,4 @@ const nextConfig = {
swcMinify: true,
};

module.exports = withBundleAnalyzer(withExcss(nextConfig));
export default withBundleAnalyzer(withExcss(nextConfig));

0 comments on commit 60e6a3d

Please sign in to comment.