Skip to content

In addon: only runs in the dummy app #32

@ppcano

Description

@ppcano

https://github.com/ppcano/compatibility-helper-addon reproduces the error.

  1. In the dummy app, using ember-compatibility-helpers works and Babel transforms properly the flag of the dummy.js file.
// tests/dummy/app/controllers/application.js

import { gte } from "ember-compatibility-helpers";
import Controller from "@ember/controller";
import { computed } from "@ember/object";

export default Controller.extend({
  gte3: computed(function() {
    return gte("3.0.0");
  })
});
  1. In the addon folder, it triggers the error Uncaught Error: Could not find module ember-compatibility-helpers imported from compatibility-helper-addon/components/test-component
// addon/components/test-component.js

import Component from '@ember/component';
import layout from '../templates/components/test-component';
import { computed } from "@ember/object";

import { gte } from "ember-compatibility-helpers";

export default Component.extend({
  layout,
  gte3: computed(function() {
    return gte("3.0.0");
  })
});

This behaviour looks to be totally different than the one reported at #29, the issue was initially reported at ember-cli/ember-welcome-page#124

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions