Merge pull request #17 from ArcherGu/module-esnext

fix: tsconfig support ESM
This commit is contained in:
草鞋没号 2021-07-20 14:08:41 +08:00 committed by GitHub
commit 46c4f39666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -20,9 +20,7 @@ export default (env = 'production') => {
nodeResolve(),
commonjs(),
json(),
typescript({
module: 'ESNext',
}),
typescript(),
alias({
entries: [
{ find: '@render', replacement: join(__dirname, '../src/render') },

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "CommonJS",
"module": "ESNext",
"moduleResolution": "node",
"importHelpers": true,
"jsx": "preserve",
@ -17,5 +17,10 @@
"@root/*": ["./*"]
},
"allowSyntheticDefaultImports": true
},
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
}
}