Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (!packageOptions.babel) {
packageOptions.babel = {};
}
let babelConfig = packageOptions.babel as TransformOptions;
Object.assign(packageOptions['ember-cli-babel'], {
compileModules: false,
disablePresetEnv: true,
disableDebugTooling: true,
disableEmberModulesAPIPolyfill: true,
});
if (version && semver.satisfies(semver.coerce(version) || version, '^5')) {
unsupported(`${this.name} is using babel 5. Not installing our custom plugin.`);
return;
}
if (!babelConfig.plugins) {
babelConfig.plugins = [];
} else {
babelConfig.plugins = babelConfig.plugins.filter(babelPluginAllowedInStage1);
}
if (this.templateCompiler) {
babelConfig.plugins.push(this.templateCompiler.inlineTransformsBabelPlugin());
}
}
private build(): IntermediateBuild {
let built = new IntermediateBuild();
if (this.moduleName !== this.name) {
built.staticMeta['renamed-packages'] = {
[this.moduleName]: this.name,
};
}
if (this.customizes('treeFor')) {
unsupported(`${this.name} has customized treeFor`);
}
this.buildTreeForAddon(built);
this.buildAddonStyles(built);
this.buildTreeForStyles(built);
this.buildAddonTestSupport(built);
this.buildTestSupport(built);
this.buildTreeForApp(built);
this.buildPublicTree(built);
this.buildVendorTree(built);
this.buildEngineConfig(built);
return built;
}
}