Skip to content

Rename import path to ember-fetch #330

Description

@chriskrycho

It's a best practice in general, for imports to come from their package name rather than some more "convenient" name, and will become more so as Embroider lands:

New addons should not use renaming rules because it's confusing when the imports people type don't align with their real dependencies.

The import style here should simply be:

import fetch from 'ember-fetch';

This is not a blocker for use with Embroider, as there are solutions to support the existing flow, but is a nice improvement and will eliminate one thing that has to be done for this to use Embroider. It also has the nice upside of eliminating all shenanigans required to have this do the right thing for TypeScript integration!

This would be a breaking change, but should also be trivially codemod-able.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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