(projectDir: string = process.cwd())
| 121 | } |
| 122 | |
| 123 | export 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 | |
| 170 | export interface DtsRegistration { |
| 171 | /** |
no test coverage detected