dxf-parser icon indicating copy to clipboard operation
dxf-parser copied to clipboard

`loglevel` causes compilation warning

Open FishOrBear opened this issue 6 years ago • 1 comments

I am using webpack to package the app. Why do I include loglevel in the package I am publishing? This may cause some problems.

WARNING in ../PROJECT/node_modules/loglevel/lib/loglevel.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* D:\Dev\PROJECT\node_modules\loglevel\lib\loglevel.js
    Used by 1 module(s), i. e.
    D:\Dev\PROJECT\node_modules\webpack-dev-server\client\utils\log.js
* D:\Dev\PROJECT\node_modules\loglevel\lib\loglevel.js
    Used by 1 module(s), i. e.
    D:\Dev\PROJECT\node_modules\dxf-parser\src\DxfParser.js
 @ ../PROJECT/node_modules/loglevel/lib/loglevel.js
 @ ../PROJECT/node_modules/webpack-dev-server/client/utils/log.js
 @ ../PROJECT/node_modules/webpack-dev-server/client?http://0.0.0.0:7778
 @ multi ../PROJECT/node_modules/webpack-dev-server/client?http://0.0.0.0:7778 ../PROJECT/node_modules/webpack/hot/dev-server.js ./src/index.tsx
Child html-webpack-plugin for "index.html":
                                   Asset      Size  Chunks             Chunk Names      
    90ff598512a8eb717c8b.hot-update.json  44 bytes          [emitted]
     + 1 hidden asset
    Entrypoint undefined = index.html
       3 modules
i 「wdm」: Compiled with warnings.

FishOrBear avatar Jul 02 '19 02:07 FishOrBear

ah yes, log level was useful for debugging, but probably not good for production. There is probably some way for us to make it a noop in production so the library is not needed. There may also be better alternative logging libraries to use.

bzuillsmith avatar Sep 13 '21 15:09 bzuillsmith