Skip to content

Commit 8b801ae

Browse files
feat(rich-text): update rollup config for table-better support
1 parent a7a4921 commit 8b801ae

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1+
import typescript from "@rollup/plugin-typescript";
12
import preserveDirectives from "rollup-preserve-directives";
23

34
export default args => {
45
const result = args.configDefaultConfig;
56
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+
722
return config;
823
});
924
};

0 commit comments

Comments
 (0)