**wgsl-link** is a tool for preprocessing and linking multiple WGSL shader modules into a single WGSL module from the command line.
npm install wgsl-linkwgsl-link is a tool for preprocessing and linking multiple WGSL shader modules into a single WGSL module from the command line.
See wgsl-linker
for more details of wgsl syntax extensions
like #import and #export.
``sh`
wgsl-link
Merges the rootWgsl file with any imports
found in the libraryWgsl files and outputs a bundled wgsl to stdout.
--define name=value
defines variables for conditional compilation
and template preocessing. Mutliple name=value pairs can be specified.
--base-dir
sets the base directory for resolving relative paths.