Skip to content

Feedback on using new URL ( , import. meta. URL). href #15290

@write31bug

Description

@write31bug

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

When I use template strings like this,
const pngName = 'sun.png' let img = new URL(../../assets/icons/weather/${pngName}, import.meta.url).href
it's correct.Or I can use it this way
let img = new URL(@/assets/icons/weather/sun.png, import.meta.url).href, which is also correct.
But using both together is wrong.like
const pngName = 'sun.png' let img = new URL(@/assets/icons/weather/${pngName}, import.meta.url).href

Your Suggestion for Changes

Please continue to improve the relevant manuals or optimize them

Reproduction

No response

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions