rikmms / progress-bar-4-axios

Slim progress bar (NProgress) for Web applications that use Axios library for HTTP requests
MIT License
246 stars 32 forks source link

Cannot resolve dependency css-loader #1

Closed looterz closed 6 years ago

looterz commented 6 years ago

Here is the error message I receive when attempting to use this module as described in the README.

×  node_modules\axios-progress-bar\dist\index.js:173:28: Cannot resolve dependency '!!../css-loader/ind  171 | nprogresif(!content.locals) {
  172 |                 module.hot.accept("!!../css-loader/index.js!./nprogress.css", function() {
> 173 |                         var newContent = require("!!../css-loader/index.js!./nprogress.css");
      |                                                  ^
  174 |                         if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  175 |                         update(newContent);
  176 |                 });
rikmms commented 6 years ago

Hi, @looterz.

I updated the module to use the split CSS functionality in Webpack (check the updated documentation in the README file). With that, the CSS file that contains the customization of the progress bar is now imported separately from the JS bundle (it's typically best practice to split the CSS out into a separate file).