From c771d53e543a61003d5990062c44a4d099846d1f Mon Sep 17 00:00:00 2001 From: Dennis Hedegaard Date: Sun, 15 Dec 2024 13:26:58 +0100 Subject: [PATCH] ESM --- jest.config.js => jest.config.cjs | 0 next.config.js | 7 ------- next.config.ts | 6 ++++++ package.json | 1 + postcss.config.js => postcss.config.mjs | 2 +- tailwind.config.js => tailwind.config.ts | 7 ++++--- 6 files changed, 12 insertions(+), 11 deletions(-) rename jest.config.js => jest.config.cjs (100%) delete mode 100644 next.config.js create mode 100644 next.config.ts rename postcss.config.js => postcss.config.mjs (76%) rename tailwind.config.js => tailwind.config.ts (53%) diff --git a/jest.config.js b/jest.config.cjs similarity index 100% rename from jest.config.js rename to jest.config.cjs diff --git a/next.config.js b/next.config.js deleted file mode 100644 index d13bf40..0000000 --- a/next.config.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @type {import('next').NextConfig} - */ -module.exports = { - reactStrictMode: true, - output: 'export', -} diff --git a/next.config.ts b/next.config.ts new file mode 100644 index 0000000..f7e4145 --- /dev/null +++ b/next.config.ts @@ -0,0 +1,6 @@ +import type { NextConfig } from 'next' + +export default { + reactStrictMode: true, + output: 'export', +} satisfies NextConfig diff --git a/package.json b/package.json index 427c7c8..450bc97 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "homepage": "https://tetris.dhedegaard.dk", "version": "0.1.0", "private": true, + "type": "module", "engines": { "node": ">=22" }, diff --git a/postcss.config.js b/postcss.config.mjs similarity index 76% rename from postcss.config.js rename to postcss.config.mjs index 33ad091..2e7af2b 100644 --- a/postcss.config.js +++ b/postcss.config.mjs @@ -1,4 +1,4 @@ -module.exports = { +export default { plugins: { tailwindcss: {}, autoprefixer: {}, diff --git a/tailwind.config.js b/tailwind.config.ts similarity index 53% rename from tailwind.config.js rename to tailwind.config.ts index 465ca85..e7564f7 100644 --- a/tailwind.config.js +++ b/tailwind.config.ts @@ -1,8 +1,9 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { +import type { Config } from 'tailwindcss' + +export default { content: ['./src/**/*.{js,ts,jsx,tsx}'], theme: { extend: {}, }, plugins: [], -} +} satisfies Config