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 = {
147
147
{ name : 'handlebars-loader' , enforce_version : true }
148
148
] ,
149
149
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'
150
158
}
151
159
} ;
152
160
Original file line number Diff line number Diff line change 10
10
'use strict' ;
11
11
12
12
const WebpackConfig = require ( '../WebpackConfig' ) ; //eslint-disable-line no-unused-vars
13
- const createPlugin = require ( '@symfony/stimulus-bridge/webpack-helper ' ) ;
13
+ const loaderFeatures = require ( '../features ' ) ;
14
14
const fs = require ( 'fs' ) ;
15
15
16
16
/**
@@ -20,6 +20,10 @@ const fs = require('fs');
20
20
*/
21
21
module . exports = function ( plugins , webpackConfig ) {
22
22
if ( webpackConfig . useStimulusBridge ) {
23
+ loaderFeatures . ensurePackagesExistAndAreCorrectVersion ( 'stimulus' ) ;
24
+
25
+ const createPlugin = require ( '@symfony/stimulus-bridge/webpack-helper' ) ;
26
+
23
27
plugins . push ( {
24
28
plugin : createPlugin ( JSON . parse ( fs . readFileSync ( webpackConfig . stimulusOptions . controllersJsonPath ) ) ) ,
25
29
} ) ;
You can’t perform that action at this time.
0 commit comments