You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to import all files in a directory but it is causing my app to crash:
import LogViews from './Logs'
When looking at the error in my webpack console I see the follow exceptions:
] looking for modules in C:\myProject\node_modules
[WEBPACK] using description file: C:\myProject\package.json (relative path: ./node_modules)
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] after using description file: C:\myProject\package.json (relative path: ./node_modules)
[WEBPACK] using description file: C:\myProject\package.json (relative path: ./node_modules/Logs/ChangeHistoryLog)
[WEBPACK] no extension
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog doesn't exist
[WEBPACK] .json
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog.json doesn't exist
[WEBPACK] .js
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog.js doesn't exist
[WEBPACK] as directory
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog doesn't exist
So, it looks like it is referencing the correct file names but can't actually find the code, and I'm guessing it falls back to checking the node modules folder. Any ideas! Could be something I'm doing wrong maybe not sure. I have it specified in the .babelrc file
Trying to import all files in a directory but it is causing my app to crash:
import LogViews from './Logs'
When looking at the error in my webpack console I see the follow exceptions:
] looking for modules in C:\myProject\node_modules
[WEBPACK] using description file: C:\myProject\package.json (relative path: ./node_modules)
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] after using description file: C:\myProject\package.json (relative path: ./node_modules)
[WEBPACK] using description file: C:\myProject\package.json (relative path: ./node_modules/Logs/ChangeHistoryLog)
[WEBPACK] no extension
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog doesn't exist
[WEBPACK] .json
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog.json doesn't exist
[WEBPACK] .js
[WEBPACK] Field 'browser' doesn't contain a valid alias configuration
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog.js doesn't exist
[WEBPACK] as directory
[WEBPACK] C:\myProject\node_modules\Logs\ChangeHistoryLog doesn't exist
So, it looks like it is referencing the correct file names but can't actually find the code, and I'm guessing it falls back to checking the node modules folder. Any ideas! Could be something I'm doing wrong maybe not sure. I have it specified in the .babelrc file
{ "presets": ["react", "es2015", "stage-0"], "plugins": ["import-directory"] }
Is there a specific way to load this when using webpack?
The text was updated successfully, but these errors were encountered: