Skip to content

Commit

Permalink
chore: Use ESModule
Browse files Browse the repository at this point in the history
  • Loading branch information
shun-shobon committed Aug 1, 2023
1 parent e98eeea commit 0de8384
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/** @type {import("eslint").ESLint.ConfigData} */
module.exports = {
root: true,
env: {
node: true,
},
parserOptions: {
project: "./tsconfig.eslint.json",
tsconfigRootDir: __dirname,
Expand Down
2 changes: 1 addition & 1 deletion headers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import("next/dist/lib/load-custom-routes").Header[]} */
module.exports = [
export const headers = [
{
source: "/(.*)",
headers: [
Expand Down
13 changes: 7 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const withBundleAnalyzer = require("@next/bundle-analyzer")({
import createBundleAnalyzer from "@next/bundle-analyzer";

import { headers } from "./headers.js";

const withBundleAnalyzer = createBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});

const headers = require("./headers");

/** @type {import('next').NextConfig} */
/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
swcMinify: true,
Expand All @@ -13,5 +15,4 @@ const config = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
module.exports = withBundleAnalyzer(config);
export default withBundleAnalyzer(config);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "blog.s2n.tech",
"private": true,
"packageManager": "pnpm@8.6.11",
"type": "module",
"scripts": {
"start": "next start",
"gen": "run-s gen:*",
Expand Down
File renamed without changes.

1 comment on commit 0de8384

@vercel
Copy link

@vercel vercel bot commented on 0de8384 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog-s2n-tech – ./

blog-s2n-tech-git-master-shun-shobon.vercel.app
blog.s2n.tech
blog-s2n-tech-shun-shobon.vercel.app

Please sign in to comment.