Skip to content

Commit

Permalink
feat: move to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Sep 6, 2023
1 parent 8557499 commit d33184d
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .eslintrc.repo.js → .eslintrc.repo.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WARN = 1;
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: [
"./.eslintrc.js",
"./.eslintrc.cjs",
"@remix-run/eslint-config/internal",
"plugin:markdown/recommended",
],
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions mocks/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { rest } = require("msw");
const { setupServer } = require("msw/node");
import { rest } from "msw";
import { setupServer } from "msw/node";

// put one-off handlers that don't really need an entire file to themselves here
const miscHandlers = [
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "blues-stack-template",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "run-s build:*",
"build:remix": "remix build",
Expand Down Expand Up @@ -98,6 +99,6 @@
"node": ">=14.0.0"
},
"prisma": {
"seed": "ts-node --require tsconfig-paths/register prisma/seed.ts"
"seed": "ts-node --esm --require tsconfig-paths/register prisma/seed.ts"
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions remix.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
export default {
cacheDirectory: "./node_modules/.cache/remix",
future: {
v2_dev: true,
Expand All @@ -11,6 +11,6 @@ module.exports = {
},
ignoredRouteFiles: ["**/.*", "**/*.test.{js,jsx,ts,tsx}"],
postcss: true,
serverModuleFormat: "cjs",
serverModuleFormat: "esm",
tailwind: true,
};
2 changes: 1 addition & 1 deletion remix.init/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const main = async ({ isTypeScript, packageManager, rootDirectory }) => {
fs.rm(path.join(rootDirectory, ".github", "workflows", "no-response.yml")),
fs.rm(path.join(rootDirectory, ".github", "dependabot.yml")),
fs.rm(path.join(rootDirectory, ".github", "PULL_REQUEST_TEMPLATE.md")),
fs.rm(path.join(rootDirectory, ".eslintrc.repo.js")),
fs.rm(path.join(rootDirectory, ".eslintrc.repo.cjs")),
fs.rm(path.join(rootDirectory, "LICENSE.md")),
];

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "CommonJS",
"module": "ES2020",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
Expand Down

0 comments on commit d33184d

Please sign in to comment.