worker-sourcemap-config.js — vite Source File
Architecture documentation for worker-sourcemap-config.js, a javascript file in the vite codebase. 2 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 8889430f_4164_7ad2_0277_56b5c3b713b8["worker-sourcemap-config.js"] 21773861_3e8d_df41_79a7_889aeee438a8["worker-plugin-test-plugin.js"] 8889430f_4164_7ad2_0277_56b5c3b713b8 --> 21773861_3e8d_df41_79a7_889aeee438a8 54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"] 8889430f_4164_7ad2_0277_56b5c3b713b8 --> 54c37fea_4fe7_2693_71cb_1276b77f55f9 77385e17_3062_6706_e858_f759609bd4a1["vite.config-sourcemap-hidden.js"] 77385e17_3062_6706_e858_f759609bd4a1 --> 8889430f_4164_7ad2_0277_56b5c3b713b8 c75e87c0_a5f0_6ffc_58bd_faed366496d4["vite.config-sourcemap-inline.js"] c75e87c0_a5f0_6ffc_58bd_faed366496d4 --> 8889430f_4164_7ad2_0277_56b5c3b713b8 1ad201c4_6fd2_0c43_e991_a66cd70ca796["vite.config-sourcemap.js"] 1ad201c4_6fd2_0c43_e991_a66cd70ca796 --> 8889430f_4164_7ad2_0277_56b5c3b713b8 style 8889430f_4164_7ad2_0277_56b5c3b713b8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { defineConfig } from 'vite'
import workerPluginTestPlugin from './worker-plugin-test-plugin'
/** @param {boolean | 'inline' | 'hidden' | 'sourcemap'} sourcemap */
export default (sourcemap) => {
sourcemap =
/** @type {'inline' | 'hidden' | 'sourcemap'} */ (
process.env.WORKER_MODE
) || sourcemap
if (sourcemap === 'sourcemap') {
sourcemap = true
}
const typeName =
typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap
return defineConfig({
base: `/iife-${typeName}/`,
resolve: {
alias: {
'@': import.meta.dirname,
},
},
worker: {
format: 'iife',
plugins: () => [workerPluginTestPlugin()],
rollupOptions: {
output: {
assetFileNames: 'assets/[name]-worker_asset[hash].[ext]',
chunkFileNames: 'assets/[name]-worker_chunk[hash].js',
entryFileNames: 'assets/[name]-worker_entry[hash].js',
},
},
},
build: {
outDir: `dist/iife-${typeName}/`,
assetsInlineLimit: (filePath) =>
filePath.endsWith('.svg') ? false : undefined,
sourcemap: sourcemap,
rollupOptions: {
output: {
assetFileNames: 'assets/[name]-[hash].[ext]',
chunkFileNames: 'assets/[name]-[hash].js',
entryFileNames: 'assets/[name]-[hash].js',
},
},
},
plugins: [workerPluginTestPlugin()],
cacheDir: `node_modules/.vite-sourcemap-${typeName}`,
})
}
Domain
Dependencies
Imported By
Source
Frequently Asked Questions
What does worker-sourcemap-config.js do?
worker-sourcemap-config.js is a source file in the vite codebase, written in javascript. It belongs to the ViteCore domain.
What does worker-sourcemap-config.js depend on?
worker-sourcemap-config.js imports 2 module(s): vite, worker-plugin-test-plugin.js.
What files import worker-sourcemap-config.js?
worker-sourcemap-config.js is imported by 3 file(s): vite.config-sourcemap-hidden.js, vite.config-sourcemap-inline.js, vite.config-sourcemap.js.
Where is worker-sourcemap-config.js in the architecture?
worker-sourcemap-config.js is located at playground/worker/worker-sourcemap-config.js (domain: ViteCore, directory: playground/worker).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free