From b8bc590157ef2d32a63c13a0f673870095825182 Mon Sep 17 00:00:00 2001 From: LitoMore Date: Fri, 23 Jul 2021 23:42:41 +0800 Subject: [PATCH] Avoid ESM-related issues (#14) --- index.js | 8 ++++---- templates/ts/tsconfig.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 328c4d6..2ad3a7f 100644 --- a/index.js +++ b/index.js @@ -108,8 +108,8 @@ module.exports = () => { task: async () => { await execa('npm', [ 'install', - 'meow', - 'ink', + 'meow@9', + 'ink@3', 'react', ...dependencies ]); @@ -117,10 +117,10 @@ module.exports = () => { return execa('npm', [ 'install', '--save-dev', - 'xo', + 'xo@0.39.1', 'ava', 'ink-testing-library', - 'chalk', + 'chalk@4', 'eslint-config-xo-react', 'eslint-plugin-react', 'eslint-plugin-react-hooks', diff --git a/templates/ts/tsconfig.json b/templates/ts/tsconfig.json index 424b8b5..7e056e1 100644 --- a/templates/ts/tsconfig.json +++ b/templates/ts/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "@sindresorhus/tsconfig", "compilerOptions": { + "module": "commonjs", "jsx": "react", "esModuleInterop": true, "outDir": "dist"