Skip to content

Commit 923e0af

Browse files
authored
Merge pull request #20 from xiCO2k/feat/webpack-loader
Add Laravel Mix Plugin
2 parents f83be4b + 5feadce commit 923e0af

13 files changed

+13694
-2539
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,22 @@ The `resolve` method can receive a `require` instead of a `Promise`:
6060
})
6161
````
6262
63+
### Laravel Mix Plugin
64+
65+
In order to load `php` translations, you can use this `Mix` plugin.
66+
67+
```js
68+
const mix = require('laravel-mix');
69+
require('laravel-vue-i18n/mix');
70+
71+
// Laravel >= 9
72+
mix.i18n();
73+
74+
// Laravel < 9, since the lang folder is inside the resources folder
75+
// you will need to pass as parameter.
76+
mix.i18n('resouces/lang');
77+
```
78+
6379
### Usage
6480

6581
```html

mix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./dist/mix');

0 commit comments

Comments
 (0)