8000 See to provide ESM versions of `webpack/{lazy-controller-,}loader.js` files · Issue #106 · symfony/stimulus-bridge · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

See to provide ESM versions of webpack/{lazy-controller-,}loader.js files #106

Closed
Kocal opened this issue Jan 25, 2025 · 1 comment
Closed

Comments

@Kocal
Copy link
Member
Kocal commented Jan 25, 2025

No description provided.

A3D7
Kocal added a commit to Kocal/symfony-stimulus-bridge that referenced this issue Jan 28, 2025
@Kocal
Copy link
Member Author
Kocal commented Jan 28, 2025

Well, I wasn't able to use the ESM version of webpack/lazy-controller-loader.js (webpack/lazy-controller-loader.mjs) through, it keeps using the CJS version:

// assets/bootstrap.js
export const app = startStimulusApp(import.meta.webpackContext(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    {
        recursive: true,
        regExp: /\.[jt]sx?$/
    }
));

export const app = startStimulusApp(import.meta.webpackContext(
    '@symfony/stimulus-bridge/lazy-controller-loader.mjs!./controllers',
    {
        recursive: true,
        regExp: /\.[jt]sx?$/
    }
));

Maybe it's because Encore / Symfony apps using Encore are not compatible with ESM yet?

Let's close for the moment, and re-open/merge when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0