UI5 / UI5/webcomponents

[ManagedStyles.js]: Cannot use 'import.meta' outside a module

Open
#13,815 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

consulting Low Prio TOPIC Core
Dominant language
TypeScript
Stars
1.8k
Forks
285
Avg merge
3d 2h
Merged PRs (30d)
59

Description

Bug Description

When I was trying to make an isolated example, got an unexpected error.

Image

And I can't make the example what I tried.
Could you have a look at the following example?

Affected Component

No response

Expected Behaviour

No response

Isolated Example

https://stackblitz.com/edit/js-wm5vexwm?file=package.json,index.html,index.js,tsconfig.json

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.24.0

Browser

Chrome

Operating System

MacOS

Additional Context

No response

Organization

No response

Declaration
  • I’m not disclosing any internal or sensitive information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error in the linked StackBlitz example, starting with package.json, index.html, index.js, and tsconfig.json. Trace how ManagedStyles.js is loaded and identify why import.meta is evaluated outside a module. Done means the isolated example runs without the import.meta error in Chrome.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.