Skip to content

Webpack: absolute file paths for imports #795

@TCL735

Description

@TCL735

Updating webpack's config to use absolute paths in our imports seems easy, but it doesn't appear to work.

Currently, we already have this in webpack.common.config.js:

module.exports = {
// ...
  resolve: {
    alias: {
      src: path.resolve(__dirname, 'src'),
    },

However, attempting to use src/utils/useCanvas in an import statement will cause a build error, for example. There must be some other configuration or property that is not set correctly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions