question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should `src` directory be in `resolve.modules`?

See original GitHub issue

This is a suggestion to remove src directory from resolve.modules in webpack.base.conf.js. I know the convenience of this configuration but users may confuse if they create some new directories in src and some of them conflict with npm packages’ name.

For instance, there is a case that a user create vuex directory in src. So import Vuex from 'vuex' does not work at all. https://github.com/vuejs/vuex/issues/625

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LinusBorgcommented, Feb 14, 2017

Created a PR #516

0reactions
LinusBorgcommented, Feb 13, 2017

I think we already have an alias for src. That could also be a problem when someone uses a package named src (didn’t check but I assume one exists 😄).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support src directory as webpack resolve.modules #3596
Much code that is pasted into Create React App assumes that the src directory is resolved so that filename and module references becomes...
Read more >
Resolve | webpack
When enabled, webpack would prefer to resolve module requests as relative requests instead of using modules from node_modules directories. webpack.config.js
Read more >
Resolving require paths with webpack - Stack Overflow
This setting should be used to add individual directories to the search path. ... [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'node_modules')] ...
Read more >
Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >
Configuring Jest
The directory where Jest should output its coverage files. coveragePathIgnorePatterns [array<string>]​. Default: ["/node_modules/"]. An array of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found