-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(learned-lessons.md): document learned lessons
- Loading branch information
1 parent
6de7923
commit 6471d11
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Learned lessons | ||
|
||
This document list some issues and how they were solved | ||
|
||
## Error in Karma test: Disconnected because no message in 10000 ms | ||
|
||
http://alexeyhorn.com/javascript/karma/2017/05/31/fix-karma-disconnected-error.html | ||
|
||
## Error in nighwatch/sellenium test: session deleted because of page crash | ||
|
||
Add the '--disable-dev-shm-usage' flag to the browser. | ||
|
||
https://svdoscience.com/2021-03-17/fix-session-deleted-page-crash-selenium-grid-chrome-docker | ||
|
||
## Support for aliases in imports outside webpack cotnext | ||
|
||
Install the module-alias package - https://github.com/ilearnio/module-alias | ||
|
||
Add to package.json (for an alias to @): | ||
|
||
```js | ||
"_moduleAliases": { | ||
"@": "src/" | ||
} | ||
``` | ||
|
||
## Allow the use of import outside webpack | ||
|
||
Install the @babel/register package - https://www.npmjs.com/package/@babel/register | ||
|
||
Add to the file where you want to use import, before any import statment: | ||
|
||
```js | ||
require('@babel/register') | ||
``` | ||
|
||
## Use babel.config.js to support dynamic compiling rules | ||
|
||
babel.config.js replaces .babelrc and can have dynamic behavior |