Skip to content

Commit

Permalink
chore: use @rollup/plugin-typescript
Browse files Browse the repository at this point in the history
Replaces `rollup-plugin-typescript2` by the official core plugin for TS, which supports Rollup v3.
  • Loading branch information
cexbrayat committed Oct 14, 2022
1 parent b5484d2 commit 980ee94
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 103 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -26,6 +26,7 @@
"@rollup/plugin-json": "5.0.0",
"@rollup/plugin-node-resolve": "15.0.0",
"@rollup/plugin-replace": "5.0.0",
"@rollup/plugin-typescript": "9.0.1",
"@types/node": "18.0.6",
"@types/pretty": "2.0.1",
"@typescript-eslint/eslint-plugin": "5.39.0",
Expand All @@ -49,7 +50,6 @@
"pretty": "2.0.0",
"reflect-metadata": "0.1.13",
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.34.1",
"tslib": "2.4.0",
"typescript": "4.8.4",
"unplugin-vue-components": "0.22.8",
Expand Down
115 changes: 22 additions & 93 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 6 additions & 9 deletions rollup.config.js
@@ -1,4 +1,4 @@
import ts from 'rollup-plugin-typescript2'
import ts from '@rollup/plugin-typescript'
import resolve from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import commonjs from '@rollup/plugin-commonjs'
Expand Down Expand Up @@ -65,14 +65,11 @@ function createEntry(options) {

config.plugins.push(
ts({
check: format === 'es' && isBrowser,
tsconfigOverride: {
compilerOptions: {
declaration: format === 'es',
target: 'es5', // not sure what this should be?
module: format === 'cjs' ? 'es2015' : 'esnext'
},
exclude: ['tests']
include: ['src/**/*.ts', 'types/**/*.d.ts'],
compilerOptions: {
declaration: format === 'es',
target: 'es5', // not sure what this should be?
module: format === 'cjs' ? 'es2015' : 'esnext'
}
})
)
Expand Down

0 comments on commit 980ee94

Please sign in to comment.