|
3 | 3 | /* eslint-disable @typescript-eslint/no-var-requires */
|
4 | 4 | import path from 'path';
|
5 | 5 |
|
6 |
| -import ts from 'rollup-plugin-typescript2'; |
| 6 | +import ts from '@rollup/plugin-typescript'; |
7 | 7 | import replace from '@rollup/plugin-replace';
|
8 | 8 | import resolve from '@rollup/plugin-node-resolve';
|
9 | 9 | import commonjs from '@rollup/plugin-commonjs';
|
@@ -31,9 +31,6 @@ const banner = `/*!
|
31 | 31 | * @license MIT
|
32 | 32 | */`;
|
33 | 33 |
|
34 |
| -// ensure TS checks only once for each build |
35 |
| -let hasTSChecked = false; |
36 |
| - |
37 | 34 | const outputConfigs = {
|
38 | 35 | // each file name has the format: `dist/${name}.${format}.js`
|
39 | 36 | // format being a key of this object
|
@@ -95,25 +92,10 @@ function createConfig(format, output, plugins = []) {
|
95 | 92 |
|
96 | 93 | if (isGlobalBuild) output.name = "VueDatatableUrlSync";
|
97 | 94 |
|
98 |
| - const shouldEmitDeclarations = !hasTSChecked; |
99 | 95 |
|
100 | 96 | const tsPlugin = ts({
|
101 |
| - check: !hasTSChecked, |
102 | 97 | tsconfig: path.resolve(__dirname, '../tsconfig.json'),
|
103 |
| - cacheRoot: path.resolve(__dirname, '../node_modules/.rts2_cache'), |
104 |
| - tsconfigOverride: { |
105 |
| - compilerOptions: { |
106 |
| - sourceMap: output.sourcemap, |
107 |
| - declaration: shouldEmitDeclarations, |
108 |
| - declarationMap: shouldEmitDeclarations, |
109 |
| - }, |
110 |
| - exclude: ['__tests__', 'test-dts'], |
111 |
| - }, |
112 | 98 | });
|
113 |
| - // we only need to check TS and generate declarations once for each build. |
114 |
| - // it also seems to run into weird issues when checking multiple times |
115 |
| - // during a single build. |
116 |
| - hasTSChecked = true; |
117 | 99 |
|
118 | 100 | const external = ['vue-demi'];
|
119 | 101 |
|
@@ -197,7 +179,7 @@ function createProductionConfig(format) {
|
197 | 179 | }
|
198 | 180 |
|
199 | 181 | function createMinifiedConfig(format) {
|
200 |
| - const { terser } = require('rollup-plugin-terser'); |
| 182 | + const terser = require('@rollup/plugin-terser'); |
201 | 183 | return createConfig(
|
202 | 184 | format,
|
203 | 185 | {
|
|
0 commit comments