-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ts
34 lines (31 loc) · 1.06 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type { BuiltInCheckers, Config } from "@skbkontur/widget-platform";
import { dirname, resolve } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
function getCheckersConfig(tsconfigPath: string): BuiltInCheckers {
return {
typescript: {
tsconfigPath: resolve(__dirname, "..", tsconfigPath),
},
};
}
export default (): Config => ({
sharedModules: ["react", "react-dom", "react-dom/client"],
playground: {
htmlConfigs: {
"index.cloud.html": "getCloudConfig",
"index.prod.html": "getProdConfig",
},
checkersConfig: getCheckersConfig("./playground/tsconfig.json"),
},
jsLoader: {
sharedModules: {
"@skbkontur/global-object": { type: "namespace" }, // для работы @skbkontur/react-ui
"focus-lock": { type: "namespace" }, // только для работы @skbkontur/react-ui
},
checkersConfig: getCheckersConfig("./jsLoader/tsconfig.json"),
},
widget: {
checkersConfig: getCheckersConfig("./widget/tsconfig.json"),
},
});