File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,19 @@ const rollup = require("rollup");
44const typescriptPlugin = require ( "@rollup/plugin-typescript" ) ;
55const { nodeResolve } = require ( "@rollup/plugin-node-resolve" ) ;
66const through2 = require ( "through2" ) ;
7+ const fs = require ( "fs" ) ;
8+ const json5 = require ( "json5" ) ;
79
810const LIB_SOURCE = "../src/**/*.ts" ;
911const tsConfigPath = "../tsconfig.json" ;
1012
13+ // Read and parse tsconfig.json with json5
14+ const tsConfig = json5 . parse ( fs . readFileSync ( tsConfigPath , "utf-8" ) ) ;
15+
1116const transpileLibTypescript = ( ) =>
1217 src ( LIB_SOURCE , { sourcemaps : true } )
1318 . pipe ( through2 . obj ( function ( file , _ , cb ) {
1419 if ( file . isBuffer ( ) ) {
15- const tsConfig = require ( tsConfigPath ) ;
1620 const result = ts . transpileModule ( file . contents . toString ( ) , {
1721 compilerOptions : tsConfig . compilerOptions ,
1822 fileName : file . path ,
You can’t perform that action at this time.
0 commit comments