NPM advance-element / moment-with-locales.min.js

-2

I'm having a problem with Laravel-mix with this

WARNING Compiled with 1 warnings 20:53:09

This relative module was not found:

  • ./locale in ./resources/assets/pages/advance-elements/moment-with-locales.min.js                                                                             Asset Size Chunks Chunk Names images / vendor / datedropper / css / dd-icon / dd-icon.svg? 92ba9af80fd03d0fa6671d1557c871a0 1.78 kB [emitted]
                               fonts / themify9f24.eot? 2c454669bdf3aebf32a1bd8ac1e0d2d6 78.7 kB [emitted]
                              fonts / themify9f24.woff? a1ecc3b826d01251edddf29c3e4e1e97 56.1 kB [emitted]
                               fonts / themify9f24.ttf? e23a7dcaefbde4e74e263247aa42ecd7 78.6 kB [emitted]
                               fonts / themify9f24.svg? 9c8e96ecc7fa01e6ebcd196495ed2db5 234 kB [emitted]
    fonts / vendor / datedropper / css / dd-icon / dd-icon.eot? dedadb487a0539d3a4dbdba5edb07fe9 2.02 kB [emitted]
    fonts / vendor / datedropper / css / dd-icon / dd-icond41d.eot? dedadb487a0539d3a4dbdba5edb07fe9 2.02 kB [emitted]
    fonts / vendor / datedropper / css / dd-icon / dd-icon.woff? 08bf52b3bbaf74a1e40c963c1ca78654 1.4 kB [emitted]
    fonts / vendor / datedropper / css / dd-icon / dd-icon.ttf? b3fadd59b04db9316c75d82b7694f3be 1.86 kB [emitted]
                               fonts / themifyd41d.eot? 2c454669bdf3aebf32a1bd8ac1e0d2d6 78.7 kB [emitted]
                                 images / throbber.gif? 65741b78f605e4d22eb4ad9570552c92 1.49 kB [emitted]
                             images / details_open.png? ed1324976fd1dcb0d747a7ca5fc3ccc7 709 bytes [emitted]
                            images / details_close.png? cdb0ad00d71eff5be6ca7305cff83ce9 686 bytes [emitted]
                                       images / bg.jpg? dc3cf87d18112a35f6204913825585d4 142 kB [emitted]
                                  images / chat-bg.jpg? b04e814510747fb82cb17f2d2d86ad3a 64.8 kB [emitted]
                                 images / complete.png? f49f5eefa47626e63221e0fc1238af64 5.9 kB [emitted]
                                                                           /js/app.js 5.34 MB 0 [emitted] [big] / js / app                                                                      /css/app.css 937 kB 0 [emitted] [big] / js / app

WARNING in ./resources/assets/pages/advance-elements/moment-with-locales.min.js Module not found: Error: Can not resolve './locale' in '/ var / www / html / systems / frweb / crm / resources / assets / pages / advance-elements'  @ ./resources/assets/pages/advance-elements/moment-with-locales.min.js 463: 20-44  @ ./resources/js/depedencies.js  @ ./resources/js/app.js  @ multi ./resources/js/app.js ./resources/sass/app.scss

Has anyone ever been through this?

    
asked by anonymous 30.11.2018 / 00:10

1 answer

0

The simplest solution to forcing the webpack not to generate this error is to force it to load something different. This worked for me:

Install empty module like this:

  

npm install --save-dev empty-module

And then configure ContextReplacementPlugin like this:

  

new webpack.ContextReplacementPlugin (/./ locale $ /, 'empty-module', false, / js $ /)

I hope this helps.

    
01.12.2018 / 21:48