Skip to content

Commit 336e76e

Browse files
committed
bump deps
1 parent 690a657 commit 336e76e

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,27 @@ elixir(function(mix) {
2323
mix.webpack('app.js'); // resources/assets/js/app.js
2424
})
2525
```
26+
27+
## Extending/Modifying the Default Config
28+
29+
From Elixir's docs:
30+
31+
> If you'd like to leverage more of Webpack's functionality, Elixir will read any webpack.config.js file that is in your project root and factor its configuration into the build process.
32+
33+
For example, to make Vue use `sass-loader` for `<style lang="scss">`:
34+
35+
``` js
36+
// webpack.config.js
37+
module.exports = {
38+
vue: {
39+
loaders: {
40+
js: 'buble-loader',
41+
scss: 'vue-style-loader!css-loader!sass-loader'
42+
}
43+
}
44+
}
45+
```
46+
47+
## Using Spread Operator
48+
49+
The [Object spread operator](https://github.com/sebmarkbage/ecmascript-rest-spread) requires `Object.assign` to be available. Make sure to [polyfill it](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill) if you target browsers that don't support it yet.

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ Elixir.ready(function () {
99
},
1010
extensions: ['.js', '.vue']
1111
},
12-
// use buble loader since it is the default in Elixir
1312
vue: {
14-
loaders: {
15-
js: 'buble-loader'
13+
buble: {
14+
objectAssign: 'Object.assign'
1615
}
1716
},
1817
module: {

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@
1717
"url": "https://github.com/vuejs/laravel-elixir-vue-2/issues"
1818
},
1919
"homepage": "https://github.com/vuejs/laravel-elixir-vue-2#readme",
20+
"peerDependencies": {
21+
"vue": "^2.1.0"
22+
},
2023
"dependencies": {
21-
"css-loader": "^0.23.1",
24+
"css-loader": "^0.26.0",
2225
"file-loader": "^0.9.0",
2326
"sass-loader": "^4.0.0",
2427
"url-loader": "^0.5.7",
25-
"vue-loader": "^10.0.0"
28+
"vue-loader": "^10.0.0",
29+
"vue-template-compiler": "^2.1.0"
2630
}
2731
}

0 commit comments

Comments
 (0)