Skip to content

Commit

Permalink
build: use ts-transform-default-export for index.d.ts (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Aug 27, 2020
1 parent 4c76e1c commit dd694b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,6 @@
"compile": "tsc",
"postcompile": "npm run build:cjs",
"build:cjs": "rollup -c",
"postbuild:cjs": "node scripts/replace-legacy-export.cjs",
"prepare": "npm run compile"
},
"repository": {
Expand Down Expand Up @@ -65,6 +64,7 @@
"serve": "^11.3.2",
"standardx": "^5.0.0",
"start-server-and-test": "^1.11.2",
"ts-transform-default-export": "^1.0.2",
"typescript": "^4.0.0"
},
"files": [
Expand Down
7 changes: 6 additions & 1 deletion rollup.config.js
@@ -1,4 +1,5 @@
import ts from '@wessberg/rollup-plugin-ts'
import transformDefaultExport from 'ts-transform-default-export'

const output = {
format: 'cjs',
Expand All @@ -12,6 +13,10 @@ export default {
input: './lib/index.ts',
output,
plugins: [
ts({ /* options */ })
ts({
transformers: ({ program }) => ({
afterDeclarations: transformDefaultExport(program)
})
})
]
}
11 changes: 0 additions & 11 deletions scripts/replace-legacy-export.cjs

This file was deleted.

0 comments on commit dd694b6

Please sign in to comment.