-
Notifications
You must be signed in to change notification settings - Fork 96
/
web-dev-server.config.js
34 lines (31 loc) · 1.05 KB
/
web-dev-server.config.js
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 {
pfeDevServerConfig,
getPatternflyIconNodemodulesImports,
} from '@patternfly/pfe-tools/dev-server/config.js';
import { makeDemoEnv } from '@patternfly/pfe-tools/environment.js';
import { writeFile, mkdir } from 'node:fs/promises';
await mkdir(new URL('./_site/tools', import.meta.url), { recursive: true });
await writeFile(
new URL('./_site/tools/environment.js', import.meta.url),
await makeDemoEnv(process.cwd()),
'utf-8',
);
export default pfeDevServerConfig({
// workaround for https://github.com/evanw/esbuild/issues/3019
tsconfig: 'tsconfig.esbuild.json',
importMapOptions: {
providers: {
'zero-md': 'nodemodules',
'@patternfly/icons': 'nodemodules',
'@patternfly/elements': 'monorepotypescript',
'@patternfly/pfe-tools': 'monorepotypescript',
'@patternfly/pfe-core': 'monorepotypescript',
},
inputMap: {
imports: {
'@patternfly/pfe-tools/environment.js': './_site/tools/environment.js',
...await getPatternflyIconNodemodulesImports(import.meta.url),
},
},
},
});