File tree 1 file changed +16
-1
lines changed
packages/pluggableWidgets/rich-text-web
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ import typescript from "@rollup/plugin-typescript" ;
1
2
import preserveDirectives from "rollup-preserve-directives" ;
2
3
3
4
export default args => {
4
5
const result = args . configDefaultConfig ;
5
6
return result . map ( ( config , _index ) => {
6
- config . plugins = [ ...config . plugins , preserveDirectives ( ) ] ;
7
+ const newPlugins = config . plugins . map ( plugin => {
8
+ if ( plugin && plugin . name === "typescript" ) {
9
+ return typescript ( {
10
+ noEmitOnError : ! args . watch ,
11
+ sourceMap : config . sourceMaps ,
12
+ inlineSources : config . sourceMaps ,
13
+ target : "es2022" , // we transpile the result with babel anyway, see below
14
+ useDefineForClassFields : false ,
15
+ exclude : [ "**/__tests__/**/*" ]
16
+ } ) ;
17
+ }
18
+ return plugin ;
19
+ } ) ;
20
+ config . plugins = [ ...newPlugins , preserveDirectives ( ) ] ;
21
+
7
22
return config ;
8
23
} ) ;
9
24
} ;
You can’t perform that action at this time.
0 commit comments