Skip to content

Can't use query strings in asset path #8

@codechaotic

Description

@codechaotic

A configuration which includes any query portion to the filename, as might be used for cache busting, leads to the plugin silently failing during compile. For example the following silently fails:

// webpack.config.js
output: {
  path: ROOT,
  filename: '[name].js?[chunkhash]',
}

This should be fixed as it presents an issue for a fairly frequent use case. While there are alternative strategies for cache busting which are compatible with the plugin as it stands, such as including a hash in the filename itself, a plugin like this should be flexible.

I propose the following:

  • Keep the {file} replacement as is for backwards compatibility
  • Add {path} and {query} replacements to allow for flexible handling of filenames with queries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions