MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / defaultBuildUserConfig

Function defaultBuildUserConfig

packages/tooling/src/vite.ts:123–168  ·  view source on GitHub ↗
(projectDir: string = process.cwd())

Source from the content-addressed store, hash-verified

121}
122
123export function defaultBuildUserConfig(projectDir: string = process.cwd()): UserConfig {
124 return {
125 plugins: [licenseHeaderPlugin(), elementStyleUsingPlugin()],
126 resolve: {
127 tsconfigPaths: true,
128 alias: buildTsconfigAliases(projectDir)
129 },
130 oxc: {
131 // skip pre-built `.js` and `.d.ts` chunks; oxc only needs the TS sources.
132 exclude: [/\.js$/, /\.d\.[cm]?ts$/]
133 },
134 build: {
135 emptyOutDir: false,
136 lib: {
137 entry: {}
138 },
139 minify: false,
140 rollupOptions: {
141 external: [
142 'jQuery',
143 'vite',
144 'rollup',
145 /node:\w+/,
146 'child_process',
147 'fs',
148 'path',
149 'url',
150 'os',
151 'crypto',
152 'net',
153 /^vscode/
154 ],
155 output: [],
156 onLog(level, log, handler) {
157 switch (log.code) {
158 case 'CIRCULAR_DEPENDENCY': // ignore circular dependency warnings
159 case 'EMPTY_BUNDLE': // ignore empty bundles
160 case 'EMPTY_IMPORT_META': // rolldown's automatic `{}` substitution in non-ESM
161 return;
162 }
163 handler(level, log);
164 }
165 }
166 }
167 };
168}
169
170export interface DtsRegistration {
171 /**

Callers 6

vite.config.tsFile · 0.90
vite.config.tsFile · 0.90
vite.config.tsFile · 0.90
vite.config.tsFile · 0.90
defineEsmLibConfigFunction · 0.85

Calls 3

elementStyleUsingPluginFunction · 0.90
licenseHeaderPluginFunction · 0.85
buildTsconfigAliasesFunction · 0.85

Tested by

no test coverage detected