Skip to content

Commit 10591c3

Browse files
committed
add custom vue-loader config
1 parent 57b591c commit 10591c3

File tree

2 files changed

+46
-44
lines changed

2 files changed

+46
-44
lines changed

lib/core.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ module.exports = function(source) {
1010
this.query || this.vueMarkdown || this.options.vueMarkdown || {};
1111

1212
var filePath = this.resourcePath;
13-
13+
var vueLoaderOptions = this.query && this.query.vueLoaderOptions
1414
var result =
1515
'module.exports = require(' +
1616
loaderUtils.stringifyRequest(
1717
this,
18-
'!!vue-loader!' +
18+
'!!vue-loader' +
19+
(vueLoaderOptions ? `?${JSON.stringify(vueLoaderOptions)}` : '') +
20+
'!' +
1921
markdownCompilerPath +
2022
'?raw!' +
2123
filePath +

package.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"name": "vue-antd-md-loader",
3-
"version": "1.0.2",
4-
"description": "markdown file to vue component loader.",
5-
"main": "index.js",
6-
"scripts": {
7-
"dev": "cd example && webpack-dev-server --inline --hot --port 8888 --open"
8-
},
9-
"repository": {
10-
"type": "git",
11-
"url": "git+https://github.com/tangjinzhou/vue-antd-md-loader.git"
12-
},
13-
"keywords": [
14-
"vue",
15-
"markdown",
16-
"webpack",
17-
"loader"
18-
],
19-
"author": "415800467@qq.com",
20-
"license": "WTFPL",
21-
"dependencies": {
22-
"cheerio": "^0.20.0",
23-
"highlight.js": "^9.4.0",
24-
"loader-utils": "^0.2.15",
25-
"markdown-it": "^8.4.0"
26-
},
27-
"peerDependencies": {
28-
"vue-loader": ">=10.0.0"
29-
},
30-
"devDependencies": {
31-
"babel-core": "^6.17.0",
32-
"babel-loader": "^6.2.5",
33-
"babel-preset-es2015": "^6.16.0",
34-
"css-loader": "^0.25.0",
35-
"github-markdown-css": "^2.3.0",
36-
"style-loader": "^0.13.1",
37-
"vue": "^2.0.3",
38-
"vue-loader": "^12.1.0",
39-
"vue-template-compiler": "^2.3.3",
40-
"webpack": "^2.6.0",
41-
"webpack-dev-server": "^2.4.5"
42-
}
43-
}
2+
"name": "vue-antd-md-loader",
3+
"version": "1.0.3",
4+
"description": "markdown file to vue component loader.",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "cd example && webpack-dev-server --inline --hot --port 8888 --open"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/tangjinzhou/vue-antd-md-loader.git"
12+
},
13+
"keywords": [
14+
"vue",
15+
"markdown",
16+
"webpack",
17+
"loader"
18+
],
19+
"author": "415800467@qq.com",
20+
"license": "WTFPL",
21+
"dependencies": {
22+
"cheerio": "^0.20.0",
23+
"highlight.js": "^9.4.0",
24+
"loader-utils": "^0.2.15",
25+
"markdown-it": "^8.4.0"
26+
},
27+
"peerDependencies": {
28+
"vue-loader": ">=10.0.0"
29+
},
30+
"devDependencies": {
31+
"babel-core": "^6.17.0",
32+
"babel-loader": "^6.2.5",
33+
"babel-preset-es2015": "^6.16.0",
34+
"css-loader": "^0.25.0",
35+
"github-markdown-css": "^2.3.0",
36+
"style-loader": "^0.13.1",
37+
"vue": "^2.0.3",
38+
"vue-loader": "^12.1.0",
39+
"vue-template-compiler": "^2.3.3",
40+
"webpack": "^2.6.0",
41+
"webpack-dev-server": "^2.4.5"
42+
}
43+
}

0 commit comments

Comments
 (0)