Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack: absolute file paths for imports #795

Open
TCL735 opened this issue Aug 27, 2022 · 1 comment
Open

Webpack: absolute file paths for imports #795

TCL735 opened this issue Aug 27, 2022 · 1 comment

Comments

@TCL735
Copy link
Contributor

TCL735 commented Aug 27, 2022

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.

@kristinarobinson
Copy link
Contributor

Consistency issue, look at the webpack config.

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

No branches or pull requests

2 participants