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 +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ const phpLoader = {
2626 } ) . filter ( ( file ) => {
2727 return path . extname ( file . path ) === '.php' ;
2828 } ) . filter ( ( file ) => {
29- var filename = file . path . split ( langDirectory + path . sep ) [ 1 ]
29+ if ( typeof options . includeOnly === 'undefined' ) return true ;
30+ var filename = path . basename ( file . path , '.php' ) ;
3031 return options . includeOnly . includes ( filename ) ;
3132 } ) . filter ( ( file ) => {
32- var filename = file . path . split ( langDirectory + path . sep ) [ 1 ]
33+ if ( typeof options . exclude === 'undefined' ) return true ;
34+ var filename = path . basename ( file . path , '.php' ) ;
3335 return ! options . exclude . includes ( filename ) ;
3436 } ) . forEach ( ( file ) => {
3537 var filename = file . path . split ( langDirectory + path . sep ) [ 1 ] ;
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