Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 1411858

Browse files
add
1 parent 48e2582 commit 1411858

File tree

3 files changed

+110
-21
lines changed

3 files changed

+110
-21
lines changed

package-lock.json

Lines changed: 105 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"@babel/preset-react": "^7.12.7",
3737
"@babel/preset-typescript": "^7.13.0",
3838
"@rollup/plugin-babel": "^5.2.1",
39+
"@rollup/plugin-commonjs": "^17.1.0",
40+
"@rollup/plugin-node-resolve": "^11.2.0",
3941
"babel-plugin-source-map-support": "^2.1.3",
4042
"prop-types": "^15.7.2",
4143
"react": "^17.0.1",

src/transpiler/transpiler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import Path from 'path';
22

33
import { rollup } from 'rollup';
4+
import commonjs from '@rollup/plugin-commonjs';
5+
import resolve from '@rollup/plugin-node-resolve';
46
import babel from '@rollup/plugin-babel';
57

68
import { getStatsInDir } from '../utils';
79
import { TranspileFilesOptions } from '../types';
810

911
const ROOT_DIR = Path.resolve(__dirname, '../..');
12+
const extensions = ['.js', '.jsx', '.cjs', '.tsx'];
1013

1114
/**
1215
* Transpile files in a given directory (and sub directory if recursive option are passed) and write it to an output directory,

0 commit comments

Comments
 (0)