Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 2afe525

Browse files
committed
init
0 parents  commit 2afe525

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.DS_Store

index.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
var elixir = require('laravel-elixir')
2+
3+
// temporary hack so that we can inject additional options to
4+
// laravel-exlixir-webpack-official
5+
var fn = elixir.mixins.webpack
6+
elixir.mixins.webpack = function (file, input, output, options) {
7+
options = options || {}
8+
9+
options.resolve = options.resolve || {}
10+
options.resolve.alias = options.resolve.alias || {}
11+
options.resolve.alias.vue = 'vue/dist/vue.js'
12+
13+
options.vue = options.vue || {}
14+
options.vue.loaders = options.vue.loaders || {}
15+
options.vue.loaders.js = options.vue.loaders.js || 'buble'
16+
17+
return fn.call(this, file, input, output, options)
18+
}
19+
20+
elixir.ready(function () {
21+
elixir.config.js.webpack.loaders.push(
22+
{
23+
test: /\.vue$/,
24+
loader: 'vue'
25+
},
26+
{
27+
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
28+
loader: 'file',
29+
query: {
30+
limit: 10000,
31+
name: '../img/[name].[hash:7].[ext]'
32+
}
33+
},
34+
{
35+
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
36+
loader: 'url',
37+
query: {
38+
limit: 10000,
39+
name: '../fonts/[name].[hash:7].[ext]'
40+
}
41+
}
42+
)
43+
})

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "laravel-elixir-vue-2",
3+
"version": "0.1.0",
4+
"description": "'Laravel Elixir Vue 2.0 Integration'",
5+
"main": "index.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/vuejs/laravel-elixir-vue-2.git"
9+
},
10+
"keywords": [
11+
"vue",
12+
"laravel"
13+
],
14+
"author": "Evan You",
15+
"license": "MIT",
16+
"bugs": {
17+
"url": "https://github.com/vuejs/laravel-elixir-vue-2/issues"
18+
},
19+
"homepage": "https://github.com/vuejs/laravel-elixir-vue-2#readme",
20+
"dependencies": {
21+
"css-loader": "^0.23.1",
22+
"file-loader": "^0.9.0",
23+
"url-loader": "^0.5.7",
24+
"vue-loader": "^9.3.2"
25+
}
26+
}

0 commit comments

Comments
 (0)