shlomiassaf / ng-router-loader

Webpack loader for NgModule lazy loading using the angular router
MIT License
46 stars 8 forks source link

(node:30264) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils. #18

Closed IAMtheIAM closed 6 years ago

IAMtheIAM commented 6 years ago

Is this package going to be maintained or should we use a replacement? @ngtools/webpack is great for AOT, but for webpack-dev-server it is not good and breaks things, so we have been using your loader with others like this.

 /**
                * JIT DEV BUILD
                */

               : [{
                  loader : 'cache-loader',
                  options: cacheLoaderOptions
               }, {
                  loader : '@angularclass/hmr-loader',
                  options: {
                     pretty: !isProduction,
                     prod  : isProduction
                  }
               }, {
                  /**
                   * Lazy Module loader
                   *  MAKE SURE TO CHAIN VANILLA JS CODE, I.E. TS COMPILATION OUTPUT.
                   */
                  loader : 'ng-router-loader',
                  options: {
                     loader: 'async-import',
                     aot   : AOT
                  }
               }, {
                  loader : 'thread-loader',
                  options: {
                     // there should be 1 cpu for the fork-ts-checker-webpack-plugin
                     // workers: require('os').cpus().length - 1,
                     workers: isDevServer
                        ? 3
                        : require('os').cpus().length - 1 // fastest build time for devServer: 3 threads; for production: 7 threads (os cpus minus 1)
                  }
               },

                  {
                     loader : 'ts-loader',
                     options: {
                        // disable type checker - we will use it in fork plugin
                        transpileOnly: true,
                        happyPackMode: true
                     }
                  }, {
                     loader: 'angular2-template-loader'
                  }]

But now we are receiving:

(node:35524) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
    at Object.parseQuery (C:\Source\frontend\node_modules\ng-router-loader\node_modules\loader-utils\index.js:78:3)

Is there a fix?