diff --git a/symfony/webpack-encore-bundle/1.0/assets/bootstrap.js b/symfony/webpack-encore-bundle/1.0/assets/bootstrap.js index 9792e6abf..cb771d291 100644 --- a/symfony/webpack-encore-bundle/1.0/assets/bootstrap.js +++ b/symfony/webpack-encore-bundle/1.0/assets/bootstrap.js @@ -1,5 +1,8 @@ import { startStimulusApp } from '@symfony/stimulus-bridge'; -import '@symfony/autoimport'; // Registers Stimulus controllers from controllers.json and in the controllers/ directory -export const app = startStimulusApp(require.context('./controllers', true, /\.(j|t)sx?$/)); +export const app = startStimulusApp(require.context( + '@symfony/stimulus-bridge/lazy-controller-loader!./controllers', + true, + /\.(j|t)sx?$/ +)); diff --git a/symfony/webpack-encore-bundle/1.0/package.json b/symfony/webpack-encore-bundle/1.0/package.json index b61896260..ba0e4f414 100644 --- a/symfony/webpack-encore-bundle/1.0/package.json +++ b/symfony/webpack-encore-bundle/1.0/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "@symfony/stimulus-bridge": "^1.1.0", + "@symfony/stimulus-bridge": "^2.0.0", "@symfony/webpack-encore": "^1.0.0", "core-js": "^3.0.0", "regenerator-runtime": "^0.13.2",