How to use the @embroider/core/src/messages.unsupported function in @embroider/core

To help you get started, we’ve selected a few @embroider/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github embroider-build / embroider / packages / compat / src / v1-addon.ts View on Github external
}

    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());
    }
  }
github embroider-build / embroider / packages / compat / src / v1-addon.ts View on Github external
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;
  }
}