Skip to content

in webpack resolve.alias should be resolve.root #28

@wassname

Description

@wassname

Here is a suggestion for an improvement to webpack config. Replace resolve.alias with resolve.root.

Why? Alias is bad because it applied to all imports, and in the current state is adds an extra slash breaks some imports.

E.g. importing 'helpers/actions/ActionWrapper.js' would convert to 'helpers/actions//ActionWrapper.js'

Or am I missing something about the reason it was used?

Instead, add to the search path using resolve.root.

PR submitted.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions