giraffe icon indicating copy to clipboard operation
giraffe copied to clipboard

Webpack: absolute file paths for imports

Open TCL735 opened this issue 2 years ago • 1 comments

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.

TCL735 avatar Aug 27 '22 00:08 TCL735

Consistency issue, look at the webpack config.

kristinarobinson avatar Sep 30 '22 20:09 kristinarobinson