Skip to content

set codebase path based on import.meta.url? #134

Description

@shsteimer

There may be some history I'm missing here, but I think the current approach to set codebase path based on location of scripts.js stems from before lib-franklin/aem.js was separated from scripts.js.

import.meta.url is well supported (pretty much anywhere dynamic import() is supported), and think this may be slightly simpler:

[window.hlx.codeBasePath] = new URL(import.meta.url).pathname.split('/scripts/');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions