Skip to content

Commit

Permalink
refactor!: don't resolve tsconfig
Browse files Browse the repository at this point in the history
closes #365, closes #366
  • Loading branch information
sxzz committed Sep 20, 2023
1 parent c806163 commit 6545a58
Show file tree
Hide file tree
Showing 8 changed files with 749 additions and 559 deletions.
7 changes: 7 additions & 0 deletions example/class.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export class A {
foo = 'bar'
num
constructor() {
this.num ||= 2
}
}
3 changes: 2 additions & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import * as Vue from 'vue'
import React from 'react'
import * as Three from 'three'
import * as _ from 'lodash'
import * as clz from './class'

export { Foo, Vue, React, Three, _ }
export { Foo, Vue, React, Three, _, clz }
1 change: 1 addition & 0 deletions example/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
optimizeDeps: {
include: optimize ? ['vue', 'react', 'three', 'lodash'] : [],
},
tsconfig: path.join(__dirname, 'tsconfig.json'),
}),
!optimize && cjs(),
!optimize && nodeResolve(),
Expand Down
5 changes: 5 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"useDefineForClassFields": false
}
}
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "rollup-plugin-esbuild",
"version": "0.0.0-semantic-release",
"packageManager": "pnpm@8.7.6",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -28,7 +29,7 @@
"@types/debug": "^4.1.7",
"@types/jest": "^29.1.2",
"@types/node": "16.11.66",
"esbuild": "^0.15.11",
"esbuild": "^0.19.3",
"istextorbinary": "^6.0.0",
"jest": "^29.2.0",
"lodash": "^4.17.21",
Expand All @@ -45,9 +46,7 @@
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
"debug": "^4.3.4",
"es-module-lexer": "^1.0.5",
"joycon": "^3.1.1",
"jsonc-parser": "^3.2.0"
"es-module-lexer": "^1.0.5"
},
"peerDependencies": {
"esbuild": ">=0.10.1",
Expand Down
Loading

0 comments on commit 6545a58

Please sign in to comment.