Skip to content

JS import module fails #53849

Closed
Closed
@sQuarecoW

Description

@sQuarecoW

Symfony version(s) affected

6.4.3

Description

When importing a module from a js file the import fails:

import ThemeSwitcher from './js/themeSwitcher.js'

I get an error 404 and the file is missing from the importmap.

When I change the line to just import the file e.g.

import './js/themeSwitcher.js'

it works, but then of course the source code doesn't work anymore.

How to reproduce

In an entrypoint js file try to import a module from a different js file

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions