influxdata / influxdata/giraffe
Webpack: absolute file paths for imports
- Dominant language
- TypeScript
- Stars
- 189
- Forks
- 33
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
Research direction
Start in webpack.common.config.js by inspecting the resolve.alias configuration and reproduce the build error with an import such as src/utils/useCanvas. The work is done when imports using the src/ path build successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100