This repository was archived by the owner on Oct 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ const phpLoader = {
2525 nodir : true
2626 } ) . filter ( ( file ) => {
2727 return path . extname ( file . path ) === '.php' ;
28+ } ) . filter ( ( file ) => {
29+ if ( typeof options . includeOnly === 'undefined' ) return true ;
30+ var filename = path . basename ( file . path , '.php' ) ;
31+ return options . includeOnly . includes ( filename ) ;
32+ } ) . filter ( ( file ) => {
33+ if ( typeof options . exclude === 'undefined' ) return true ;
34+ var filename = path . basename ( file . path , '.php' ) ;
35+ return ! options . exclude . includes ( filename ) ;
2836 } ) . forEach ( ( file ) => {
2937 var filename = file . path . split ( langDirectory + path . sep ) [ 1 ] ;
3038 var filename = filename . replace ( '\\' , '/' ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module.exports = function (indexContent) {
1010 let loaderPath = 'node_modules' + path . sep + '@kirschbaum-development' + path . sep + 'laravel-translations-loader' + path . sep + 'php.js' ;
1111
1212 try {
13- options = loaderUtils . parseQuery ( this . query ) ;
13+ options = loaderUtils . getOptions ( this ) ;
1414 } catch ( e ) { }
1515
1616 if ( path . dirname ( this . resource ) . includes ( path . dirname ( loaderPath ) ) ) {
Original file line number Diff line number Diff line change @@ -177,10 +177,12 @@ mix.translations();
177177mix .extend (' translations' , new class {
178178 webpackRules () {
179179 return {
180- test: path .resolve (__dirname , ' .. /resources/lang/index.js' ),
180+ test: path .resolve (__dirname , ' ./resources/lang/index.js' ),
181181 loader: ' @kirschbaum-development/laravel-translations-loader/php' ,
182182 options: {
183- parameters: " $1"
183+ parameters: " $1" ,
184+ includeOnly: [' auth' , ' validation' ],
185+ exclude: [],
184186 }
185187 }
186188 }
You can’t perform that action at this time.
0 commit comments