MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / config

Function config

packages/vite/configuration/angular.ts:143–160  ·  view source on GitHub ↗
(userConfig)

Source from the content-addressed store, hash-verified

141 enforce: 'post',
142 apply: 'serve',
143 config(userConfig) {
144 const od = (userConfig as any)?.optimizeDeps || {};
145 const prevExclude: string[] = Array.isArray(od.exclude) ? od.exclude : [];
146 const exclude = new Set<string>(prevExclude);
147 ['@nativescript/core', 'rxjs', '@valor/nativescript-websockets', 'set-value', 'react', 'react-reconciler', 'react-nativescript'].forEach((x) => exclude.add(x));
148 return {
149 optimizeDeps: {
150 noDiscovery: true,
151 entries: [],
152 include: [],
153 exclude: Array.from(exclude),
154 esbuildOptions: {
155 ...(od.esbuildOptions || {}),
156 plugins: [],
157 },
158 },
159 } as any;
160 },
161 configResolved(resolved) {
162 const deps = (resolved.optimizeDeps ||= {} as any);
163 deps.noDiscovery = true;

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected