Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic #113

Description

@akatechis

I'm submitting a bug report

Webpack version: 2.2.1

HTML-Loader version: 0.4.4

Please tell us about your environment:
Windows 10, running webpack in Git Bash terminal.

Current behavior:
Running webpack causes the following deprecation warning:

(node:20712) 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:\workspace\app\node_modules\loader-utils\index.js:78:3)
    at getLoaderConfig (C:\workspace\app\node_modules\html-loader\index.js:17:26)
    at Object.module.exports (C:\workspace\app\node_modules\html-loader\index.js:28:15)
    at LOADER_EXECUTION (C:\workspace\app\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
    at runSyncOrAsync (C:\workspace\app\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
    at iterateNormalLoaders (C:\workspace\app\node_modules\loader-runner\lib\LoaderRunner.js:229:2)
    at Array.<anonymous> (C:\workspace\app\node_modules\loader-runner\lib\LoaderRunner.js:202:4)
    at Storage.finished (C:\workspace\app\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:38:15)
    at C:\workspace\app\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:69:9
    at C:\workspace\app\node_modules\graceful-fs\graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:415:3)

Expected/desired behavior: I should not see the deprecation warning.

The relevant rule for html-loader is the following (I'm using this in a knockout app, which allows developers to use HTML comments for data-binding "virtual elements." I configure html-loader to leave those comments intact:

{
      test: /\.html$/,
      use: [{
        loader: "html-loader",
        options: {
          ignoreCustomFragments: [/<!--\s*\/?ko.*-->/] // ignore knockout comments used for bindings
        }
      }]
}
  • What is the motivation / use case for changing the behavior?
    The issue in the deprecation warning asks webpack users to file an issue with any loader that triggers this warning.

  • Browser: all

  • Language: My config file is written in ES6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions