File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,14 @@ const features = {
147147 { name : 'handlebars-loader' , enforce_version : true }
148148 ] ,
149149 description : 'load Handlebars files'
150+ } ,
151+ stimulus : {
152+ method : 'enableStimulusBridge()' ,
153+ packages : [
154+ { name : '@symfony/stimulus-bridge' } ,
155+ { name : 'stimulus' }
156+ ] ,
157+ description : 'enable Stimulus bridge'
150158 }
151159} ;
152160
Original file line number Diff line number Diff line change 1010'use strict' ;
1111
1212const WebpackConfig = require ( '../WebpackConfig' ) ; //eslint-disable-line no-unused-vars
13- const createPlugin = require ( '@symfony/stimulus-bridge/webpack-helper ' ) ;
13+ const loaderFeatures = require ( '../features ' ) ;
1414const fs = require ( 'fs' ) ;
1515
1616/**
@@ -20,6 +20,10 @@ const fs = require('fs');
2020 */
2121module . exports = function ( plugins , webpackConfig ) {
2222 if ( webpackConfig . useStimulusBridge ) {
23+ loaderFeatures . ensurePackagesExistAndAreCorrectVersion ( 'stimulus' ) ;
24+
25+ const createPlugin = require ( '@symfony/stimulus-bridge/webpack-helper' ) ;
26+
2327 plugins . push ( {
2428 plugin : createPlugin ( JSON . parse ( fs . readFileSync ( webpackConfig . stimulusOptions . controllersJsonPath ) ) ) ,
2529 } ) ;
You can’t perform that action at this time.
0 commit comments