Skip to content

Commit

Permalink
Merge pull request #20 from xiCO2k/feat/webpack-loader
Browse files Browse the repository at this point in the history
Add Laravel Mix Plugin
  • Loading branch information
xiCO2k authored Mar 23, 2022
2 parents f83be4b + 5feadce commit 923e0af
Show file tree
Hide file tree
Showing 13 changed files with 13,694 additions and 2,539 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ The `resolve` method can receive a `require` instead of a `Promise`:
})
````
### Laravel Mix Plugin
In order to load `php` translations, you can use this `Mix` plugin.
```js
const mix = require('laravel-mix');
require('laravel-vue-i18n/mix');

// Laravel >= 9
mix.i18n();

// Laravel < 9, since the lang folder is inside the resources folder
// you will need to pass as parameter.
mix.i18n('resouces/lang');
```

### Usage

```html
Expand Down
1 change: 1 addition & 0 deletions mix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./dist/mix');
Loading

0 comments on commit 923e0af

Please sign in to comment.