Skip to content

[non-js-imports] Relative URLs in CSS cannot be properly resolved if CSS is imported as style tag #440

Description

@t2ym

[non-js-imports] Relative URLs in CSS cannot be properly resolved if CSS is imported as style tag

Root Cause

  • If <style> tag is appended to document.head, the base URL is set as the entry page, which is different from the base URL for the imported CSS

Workaround

  • Use <link> tag instead at config['non-js-imports'].cssImportTag: 'link'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions