Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createBundleCompiler() {
let delegate;
let options = this.options;
let { outputFiles, builtins } = options;
let [projectPath] = this.inputPaths;
if (options.mode && options.mode === 'module-unification') {
delegate = this.delegate = new MUCompilerDelegate({
projectPath,
outputFiles,
builtins,
});
} else if (options.delegate) {
delegate = this.delegate = new options.delegate({
projectPath,
outputFiles,
builtins,
});
}
this.compiler = new BundleCompiler(delegate, options.bundleCompiler);
}