Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/webpack4 babel@7 support #55

Open
wants to merge 370 commits into
base: 1.x/lts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
370 commits
Select commit Hold shift + click to select a range
45a551d
The docs Chinese translation (#730)
xalexec Mar 23, 2017
ddc1ec2
[Docs] Updated (#732)
anteriovieira Mar 23, 2017
b0bbc15
Update custom-blocks.md (#733)
Alex-Sokolov Mar 23, 2017
1a86efe
avoid destructuring for node < 6 compat
yyx990803 Mar 24, 2017
2cca7f6
11.3.2
yyx990803 Mar 24, 2017
c46d90f
[Docs] Updated (#735)
anteriovieira Mar 24, 2017
b98c71d
Change let to var (#738)
samwyma Mar 24, 2017
443872b
custom blocks translation for ja (#737)
kazupon Mar 24, 2017
284350f
11.3.3
yyx990803 Mar 24, 2017
3d5a917
Revert "Revert "Change let to var"" (#740)
kazupon Mar 24, 2017
331b3ba
Update advanced.md (#742)
nicholaslee119 Mar 25, 2017
8366b62
Update advanced.md for ja (#745)
kazupon Mar 26, 2017
b658719
[Docs] Fix typo (#750)
anteriovieira Mar 29, 2017
cd3a7cb
support pre/post loaders for custom blocks (#744)
kazupon Mar 29, 2017
3445153
11.3.4
yyx990803 Mar 29, 2017
4abde5c
remove @ version for extract-text-webpack-plugin (close #747)
yyx990803 Apr 6, 2017
093b4af
bring back ctx.webpack for postcss config (fix #757)
yyx990803 Apr 6, 2017
b112113
[JUST MERGE ME] Russian translation update (#761)
gbezyuk Apr 8, 2017
cc6ad1c
Add note about OccurrenceOrderPlugin (#760)
Alex-Sokolov Apr 8, 2017
3dcb402
Improve ja translations (#766)
kazupon Apr 8, 2017
7c59c9c
add issue template (#767)
kazupon Apr 8, 2017
c09aad5
save
yyx990803 Apr 11, 2017
013bca5
fix tests
yyx990803 Apr 11, 2017
0587b1b
simplify cssModules injection
yyx990803 Apr 11, 2017
ac6d480
update ssr style injection strategy
yyx990803 Apr 11, 2017
ad86fc3
adjust style injection calling by taking context as argument
yyx990803 Apr 12, 2017
fcf1cb9
preserve old client-side behavior
yyx990803 Apr 12, 2017
6232750
Russian Translation Update (#772)
gbezyuk Apr 12, 2017
ab67eea
revert
yyx990803 Apr 12, 2017
ad96422
bump dev deps
yyx990803 Apr 12, 2017
ab4e97f
Fixed typo (#770)
arliang Apr 12, 2017
01eb761
Add note about OccurrenceOrderPlugin (#773)
anteriovieira Apr 12, 2017
e0b979a
add marker for vue-style-loader to detect whether a request is made b…
yyx990803 Apr 12, 2017
20c59f2
lazy inject on client
yyx990803 Apr 12, 2017
114f394
collect component identifier during render
yyx990803 Apr 13, 2017
95f5a92
make js default loader check work when npm-linked
yyx990803 Apr 17, 2017
ba36b8a
improve css modules hot-reload
yyx990803 Apr 17, 2017
35e8aad
bump hot-reload-api version
yyx990803 Apr 17, 2017
64c539a
Docs: scoped uses data attribtute (fix #419)
LinusBorg Apr 17, 2017
0f9819a
Fix typo (#782)
Apr 20, 2017
2bf0719
use better context injection for 2.3
yyx990803 Apr 20, 2017
04890b5
only inject when __inject__ is exposed (e.g. when used with extract-t…
yyx990803 Apr 23, 2017
a0904c5
add Chinese translation link (#787)
huguangju Apr 25, 2017
515678a
built-in support for CSS extraction with extractCSS option
yyx990803 Apr 25, 2017
717413b
tests for extractCSS option
yyx990803 Apr 25, 2017
682c751
use resolve for even more robust dep checking
yyx990803 Apr 26, 2017
fa626b1
use beta for ci
yyx990803 Apr 26, 2017
e92fb76
Merge branch 'master' of github.com:vuejs/vue-loader
yyx990803 Apr 26, 2017
a8f83a2
update docs
yyx990803 Apr 26, 2017
4c7d895
12.0.0
yyx990803 Apr 26, 2017
0433c75
Do not consider private properties to be named exports (fix: https://…
matt-oconnell Apr 27, 2017
1b79438
support deps registered by postcss plugins
yyx990803 Apr 27, 2017
2241ab9
make keyframes scoped (close #731)
yyx990803 Apr 27, 2017
672cee5
only infer scss/sass loader when no explicit loaders have been specif…
yyx990803 Apr 27, 2017
34b5766
12.0.1
yyx990803 Apr 27, 2017
ad731b7
Revert "make keyframes scoped (close #731)"
yyx990803 Apr 27, 2017
e515bd3
12.0.2
yyx990803 Apr 27, 2017
cf6e04f
docs (#796)
suuzee Apr 27, 2017
8b7d00b
[JUST MERGE ME] Russian translation update (#791)
gbezyuk Apr 28, 2017
cc5b7ac
update Chinese translation (#794)
huguangju Apr 28, 2017
a8bfacc
[Fix] functional SFC style injection support (#797)
blake-newman May 2, 2017
5248103
12.0.3
yyx990803 May 2, 2017
e0da203
[Korean Docs] Update docs for v12.x (#803)
ChangJoo-Park May 2, 2017
2047e18
Improving PT BR translation for some sentences (#804)
angellicacardozo May 3, 2017
de8408b
fix documentation URL
kazupon May 3, 2017
277f05e
minor typo edit (#806)
brianzelip May 6, 2017
89acfee
fix: extractCSS should only be applied to styles (#811)
HerringtonDarkholme May 13, 2017
6b51cf5
12.0.4
yyx990803 May 13, 2017
2645669
update ja docs and other (#812)
kazupon May 16, 2017
81e30ba
support 2.4 ssr optimization
yyx990803 May 18, 2017
812905b
12.1.0
yyx990803 May 18, 2017
3127c43
fix incorrect regexp (#819)
jin5354 May 25, 2017
ae92fd9
avoid multiple webpack runs complaining about unknown option (fix #824)
yyx990803 May 26, 2017
2d816a9
simplify template preprocessor
yyx990803 May 26, 2017
6f13af2
add optimizeSSR option + improve option docs in sidebar
yyx990803 May 26, 2017
ca0f220
12.1.1
yyx990803 May 26, 2017
44493c4
Update webpack url (#830)
nicolo-ribaudo May 27, 2017
e817889
make keyframes scoped (properly)
yyx990803 Apr 27, 2017
2e2bdcd
fix single animation name
yyx990803 May 27, 2017
aa75a32
support >>> combinator
yyx990803 May 27, 2017
0d5a0ac
12.2.0
yyx990803 May 27, 2017
de48a35
update ja docs (#831)
kazupon May 28, 2017
49b5b3d
support /deep/ alias
yyx990803 May 29, 2017
dc536e1
bring back template option (close #832)
yyx990803 May 29, 2017
57d1b6c
remove unused fn
yyx990803 May 29, 2017
d3816ba
12.2.1
yyx990803 May 29, 2017
1b9da49
use shorter file path in debug trace
yyx990803 May 30, 2017
f5a0b24
fix test
yyx990803 May 30, 2017
7f33e73
update eslint config
yyx990803 Jun 1, 2017
4c3ccf6
update eslint config
yyx990803 Jun 2, 2017
dc04e0e
Support webpack 3 module concatenation by using `import`s instead
fnlctrl Jun 27, 2017
9d63d97
minor fix
fnlctrl Jun 27, 2017
bd23714
test: fix CI on windows
yyx990803 Jun 28, 2017
62d9c8f
Use `vue-loader` explictly when creating injector (#837)
fvictorio Jun 28, 2017
fd3fee5
docs: pdate scoped-css.md with info about deep selectors (#841)
lucasm-iRonin Jun 28, 2017
4ee3033
Upgrade PostCSS to 6.0.1 (#834)
termosa Jun 28, 2017
e2d856b
docs: Russian Translation Update (#833)
gbezyuk Jun 28, 2017
0e93592
docs: use phantomjs-prebuilt (#859)
anishkny Jun 28, 2017
27fd9a8
docs: add guide for global scss loading (#861)
westwick Jun 28, 2017
c4f15c4
Merge branch 'feature/webpack-3-module-concat' of https://github.com/…
yyx990803 Jun 29, 2017
07c1d09
feat: update internals to take advantage of webpack 3 module concaten…
yyx990803 Jun 29, 2017
403f321
make sure esModule is always true in inject mode
yyx990803 Jun 29, 2017
2892022
always use require for compoentNormalizer since it cannot be concaten…
yyx990803 Jun 29, 2017
a8894e2
13.0.0
yyx990803 Jun 29, 2017
fbbc5e7
Use `vue-loader` explictly when creating injector (#868)
anteriovieira Jul 1, 2017
2e77a77
Added info about deep selectors (#867)
anteriovieira Jul 1, 2017
2a894a1
update ja docs (#870)
kazupon Jul 3, 2017
a7c759e
Improve the documentation site's title area (#875)
pearofducks Jul 8, 2017
4daed6b
Fix template hmr, fix #863 (#874)
egoist Jul 10, 2017
4d0775e
13.0.1
yyx990803 Jul 10, 2017
cd00a4e
fix scoped CSS with 2.4 ssr optimization
yyx990803 Jul 13, 2017
53370e6
13.0.2
yyx990803 Jul 13, 2017
8371b30
Update spec.md (#876)
vasttian Jul 19, 2017
e4c8200
Correção texto "" (#909)
robertoentringer Jul 29, 2017
afa5e06
- Change all `>=` to `+` for consistency accross all Vue documentatio…
MachinisteWeb Jul 29, 2017
fd3587a
docs(options.md): Change default value of `esModule` (#905)
imcvampire Jul 29, 2017
9fbc36d
docs(en/options): tweak esModule note
kazupon Jul 29, 2017
edb74dc
docs(ja): update ja docs
kazupon Jul 29, 2017
20ece4f
fix css module HMR (#900)
Allenice Jul 29, 2017
7e8893a
Adds support for scoped selectors in @supports queries (#908)
fimion Jul 29, 2017
75c23ac
support comment option in template (#897)
Kingwl Jul 29, 2017
95ec3cf
support postcss.options.plugins being a function (#866)
barraponto Jul 29, 2017
696ceb9
chore(package): Bump updatable dependencies (#886)
sudo-suhas Jul 29, 2017
d664d96
Setup eslint config for test files (#888)
sudo-suhas Jul 29, 2017
7db9aee
typo (#917)
totalamd Jul 31, 2017
8011e14
Аixed a typo on line 111 (#925)
Aug 2, 2017
3e696aa
chore: Setup lint-staged with husky(pre-commit) (#914)
sudo-suhas Aug 3, 2017
72db547
fix(transform-require): support ~/ aliases (#927)
pi0 Aug 3, 2017
0ee7b34
keep path of source file in source map (#895)
Elevista Aug 3, 2017
e2513c8
bump lockfile
yyx990803 Aug 3, 2017
d8465cb
13.0.3
yyx990803 Aug 4, 2017
b29b3ef
fix: comments check (fix #931)
yyx990803 Aug 4, 2017
319293f
13.0.4
yyx990803 Aug 4, 2017
f22a18e
use npm lockfile
yyx990803 Aug 26, 2017
6f166c9
update docs theme plugin
yyx990803 Aug 26, 2017
ec6d5df
[RU] Updates (#916)
Alex-Sokolov Aug 30, 2017
eb36fa6
init project
anchengjian Mar 8, 2018
a3329da
fix: 组件名驼峰转换
aOrz Mar 9, 2018
87ff2b3
new version
anchengjian Mar 9, 2018
0e64a96
Merge pull request #1 from mpvue/develop
anchengjian Mar 9, 2018
ca435b5
fix: extend babelrc
anchengjian Mar 10, 2018
2ab9239
new version
anchengjian Mar 10, 2018
91d45ee
Merge pull request #3 from mpvue/develop
anchengjian Mar 10, 2018
0bf9db0
new version 1.0.4
aOrz Mar 14, 2018
9805159
支持 es5
aOrz Mar 15, 2018
16b64a9
Merge pull request #4 from mpvue/fix-es5-support
anchengjian Mar 15, 2018
8772c5d
fix: 自定义 entry key 为最终生成的路径
anchengjian Mar 15, 2018
448c473
new version
anchengjian Mar 15, 2018
8773ec0
new version
anchengjian Mar 15, 2018
47d3dc5
Merge pull request #5 from mpvue/develop
anchengjian Mar 15, 2018
92c6ac1
fix: path prefix in template
anchengjian Mar 15, 2018
43d89b5
new version: 1.0.7
anchengjian Mar 15, 2018
462c66b
update version
aOrz Mar 20, 2018
786c873
Merge pull request #6 from mpvue/develop
aOrz Mar 20, 2018
9a59c7d
fix #153: 根组件没有 style 模块,不生成页面的 wxss,补齐内容方便加载 vendor.wxss
anchengjian Mar 22, 2018
ba353d0
new version 1.0.9
anchengjian Mar 23, 2018
bee6287
Merge pull request #7 from mpvue/develop
anchengjian Mar 23, 2018
c2b179d
1. 增加script标签的src支持 https://github.com/Meituan-Dianping/mpvue/issues/165
WingGao Mar 23, 2018
d16cbdd
fix
WingGao Mar 23, 2018
1623977
支持空装饰器
WingGao Mar 23, 2018
ef53204
Merge pull request #8 from WingGao/develop
anchengjian Mar 30, 2018
4f042b5
new version 1.0.10
anchengjian Mar 30, 2018
0d6fc5a
Merge pull request #9 from mpvue/develop
anchengjian Mar 30, 2018
9bb05e5
fix: slot 中嵌套组件和event失效
anchengjian Apr 8, 2018
efd512a
fix: slot 中嵌套组件和event失效
anchengjian Apr 8, 2018
2a9337c
Merge branch 'develop' of http://github.com/mpvue/mpvue-loader into d…
anchengjian Apr 13, 2018
8377f29
new version
anchengjian Apr 13, 2018
ef644ea
Merge pull request #11 from mpvue/develop
anchengjian Apr 13, 2018
f5d349d
update mpvue-template-compiler version
aOrz Apr 20, 2018
5def1b8
更新slots生成机制, 规避emitFile策略造成的问题
jyootai Apr 23, 2018
f98ba9a
Merge pull request #13 from mpvue/develop
aOrz Apr 27, 2018
56cdadb
new version 1.0.13
aOrz Apr 27, 2018
066977c
修复无法引入相对路径资源的bug
Apr 29, 2018
7d786f9
添加对base64的支持
Apr 30, 2018
3249347
feature:新增全局组件功能
May 1, 2018
96c26b9
修改注释
May 2, 2018
0b28bf6
Merge pull request #16 from linrui1994/fix-relative-asset
aOrz May 4, 2018
61b1e5e
Merge pull request #17 from linrui1994/feature/global-components
aOrz May 4, 2018
ab4e586
Revert "修复无法引入相对路径资源的bug"
aOrz May 4, 2018
181a27c
Merge pull request #18 from mpvue/revert-16-fix-relative-asset
aOrz May 4, 2018
24a1337
修复相对路径资源无法正常引入的bug
May 5, 2018
3eef1a4
fix: 修复 new Vue 解析错误
May 6, 2018
09fc077
添加TS处理as的情况 https://github.com/WingGao/mpvue-ts-demo/issues/7
WingGao May 8, 2018
81f5cf3
lint
WingGao May 8, 2018
c0c1cd7
添加错误提示 https://github.com/Meituan-Dianping/mpvue/issues/425
WingGao May 8, 2018
729b335
drop base64
May 11, 2018
5b3c913
refactor: 移除timeout魔法 (#21)
jkzing May 16, 2018
c5f19e8
Merge pull request #22 from WingGao/develop
aOrz May 17, 2018
51bf667
Merge pull request #20 from mpvue/fix-new-parser
aOrz May 17, 2018
f1e2e11
Merge pull request #19 from linrui1994/fix-relative-asset
aOrz May 17, 2018
ebd10df
new version 1.0.14
aOrz May 19, 2018
14b63fa
Merge pull request #24 from mpvue/develop
aOrz May 19, 2018
b119292
fix: #207
Jun 12, 2018
b3b6682
Merge pull request #28 from exoticknight/master
anchengjian Jun 15, 2018
8d8556e
fix: callback in catch compileWxml
anchengjian Jun 15, 2018
bb44ed8
new version
anchengjian Jun 15, 2018
0e40310
Merge pull request #29 from mpvue/develop
anchengjian Jun 15, 2018
89ce97f
feat: 支持分包加载
aOrz Jul 16, 2018
e5f6369
Merge pull request #33 from mpvue/wz/feat-subcontracting
aOrz Jul 16, 2018
577e88f
fix: win 下路径判断有误的问题
aOrz Jul 20, 2018
56d7c66
fix: win 下路径兼容问题
aOrz Jul 20, 2018
f8e22d6
Merge pull request #34 from mpvue/wz/fix-win-path-error
hucq Jul 20, 2018
aece12a
fix: clean console
aOrz Jul 20, 2018
4704b32
Merge pull request #35 from mpvue/wz/fix-win-path-error
aOrz Jul 20, 2018
8190c5c
publish: 1.1.1
aOrz Jul 20, 2018
0d22e68
Merge pull request #36 from mpvue/develop
aOrz Jul 20, 2018
26c1050
fix: 图片路径解析错误的问题
aOrz Jul 23, 2018
941f605
fix: 图片引用问题
aOrz Jul 24, 2018
9ab00dc
fix: 过滤 node_modules 目录
aOrz Jul 24, 2018
f78ccfc
fix: 嵌套 node_modules 的情况
aOrz Jul 24, 2018
16d575a
Merge pull request #38 from mpvue/wz/fix-img-path-error
aOrz Jul 24, 2018
72a392c
fix: slot 文件路径错误
aOrz Jul 30, 2018
0972174
Merge pull request #39 from mpvue/wz/fix-slot-file-path
aOrz Jul 30, 2018
deae9b3
Merge pull request #41 from mpvue/develop
aOrz Aug 10, 2018
d093c11
publish: 1.1.2
aOrz Aug 10, 2018
696f764
[TS] 修复直接import报错
WingGao Aug 15, 2018
f79327f
Merge pull request #42 from WingGao/develop
anchengjian Aug 16, 2018
9f87554
fix: #562 添加默认 script 标签
F-loat Jul 22, 2018
2b831e6
Merge pull request #37 from mpvue/fix-empty-script
anchengjian Aug 16, 2018
832a5d7
[TS] 修复直接import报错
WingGao Aug 15, 2018
fe08a53
fix: #562 添加默认 script 标签
F-loat Jul 22, 2018
6f3c305
Merge branch 'develop' of http://github.com/mpvue/mpvue-loader into d…
anchengjian Aug 19, 2018
e62bd41
new version
anchengjian Aug 19, 2018
6a6da42
Merge pull request #43 from mpvue/develop
anchengjian Aug 19, 2018
ad2e803
fix: #37 产生的JS语法问题
anchengjian Sep 18, 2018
5382285
Merge pull request #46 from mpvue/develop
anchengjian Sep 18, 2018
3484bb5
merge master && feature/platform
hucq Jan 8, 2019
3b93b40
update: version
hucq Jan 8, 2019
7a0327e
Merge pull request #50 from mpvue/feature/smartprograme
hucq Jan 10, 2019
9f9d1d4
bugfix: #1371
hucq Feb 13, 2019
e627d9d
update: 1.x long time support version 1.4.0
hucq Feb 18, 2019
61eb52d
Webpack 4 Support
BugKun Mar 5, 2019
25ffb35
Webpack4 and Babel@7(@Babel) Support
BugKun Mar 5, 2019
03b9045
Webpack and Babel7(@Babel) Support
BugKun Mar 5, 2019
3d39a98
update version
BugKun Mar 5, 2019
c15a72e
Webpack4 and Babel@7(@Babel) Support
BugKun Mar 5, 2019
a575e44
update version
BugKun Mar 5, 2019
479b10d
update version
BugKun Mar 5, 2019
927c015
rename
BugKun Mar 5, 2019
492ae71
fix package.json
BugKun Mar 5, 2019
0356ea9
update readme
BugKun Mar 5, 2019
34f8780
add npmignore
BugKun Mar 5, 2019
721ca44
update readme
BugKun Mar 5, 2019
3252f15
component fix
BugKun Mar 6, 2019
d8517c5
update readme
BugKun Mar 6, 2019
7a90abb
update readme
BugKun Mar 6, 2019
c59df9b
update version
BugKun Mar 6, 2019
6ce46fd
update git url
BugKun Mar 6, 2019
652aba2
update git url
BugKun Mar 6, 2019
7ba7012
fallback readme and package.json
BugKun Mar 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["es2015"]
"presets": [
["@babel/env", { "targets": { "node": 7 }, "modules": false }]
]
}
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"root": true,
"extends": "vue"
"extends": ["plugin:vue-libs/recommended"]
}
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
IMPORTANT: Please use the following link to create a new issue:

https://new-issue.vuejs.org/?repo=vuejs/vue-loader

If your issue was not created using the app above, it will be closed immediately.
-->
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ docs/_book
.DS_Store
.idea
*.iml
yarn.lock
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
npm-debug.log
test/output
docs/_book
.DS_Store
.idea
*.iml
yarn.lock
11 changes: 5 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Q42
Copyright (c) 2018-present, 美团点评

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,14 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
24 changes: 5 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
# vue-loader [![Build Status](https://circleci.com/gh/vuejs/vue-loader/tree/master.svg?style=shield)](https://circleci.com/gh/vuejs/vue-loader/tree/master) [![npm package](https://img.shields.io/npm/v/vue-loader.svg?maxAge=2592000)](https://www.npmjs.com/package/vue-loader)
# mpvue-loader

> Vue.js component loader for [Webpack](http://webpack.github.io).
>Webpack loader for mpvue components

**NOTE: the master branch (9.0+) only works with Vue 2.x. For usage with Vue 1.x, see the [8.x branch](https://github.com/vuejs/vue-loader/tree/8.x).**
本仓库是 fork 自 [vue-loader](https://github.com/vuejs/vue-loader) 修改而来,主要为 webpack 打包 mpvue components 提供能力。

It allows you to write your components in this format:
更多详细文档请查阅 [mpvue-loader](http://mpvue.com/build/mpvue-loader)。

![screenshot](http://blog.evanyou.me/images/vue-component.png)

The best way to get started is with [vue-cli](https://github.com/vuejs/vue-cli):

``` js
npm install -g vue-cli
vue init webpack-simple hello
cd hello
npm install
npm run dev
```

This will setup a basic Webpack + `vue-loader` project for you, with `*.vue` files and hot-reloading working out of the box!

For advanced `vue-loader` configuration, checkout the [documentation](http://vuejs.github.io/vue-loader/).
bug 或者交流建议等请反馈到 [mpvue/issues](https://github.com/Meituan-Dianping/mpvue/issues)。
21 changes: 21 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Test against the latest version of this Node.js version
environment:
nodejs_version: "6"

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test

# Don't actually build.
build: off
6 changes: 5 additions & 1 deletion docs/LANGS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
* [English](en/)
* [한국어](ko/)
* [한국어](kr/)
* [Русский](ru/)
* [Português](pt_BR/)
* [日本語](ja/)
* [中文](zh-cn/)
3 changes: 2 additions & 1 deletion docs/book.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"title": "vue-loader",
"gitbook": ">3.0.0",
"plugins": ["edit-link", "theme-vuejs@git+https://github.com/pearofducks/gitbook-plugin-theme-vuejs.git", "-fontsettings", "github"],
"plugins": ["edit-link", "theme-vuejs", "-fontsettings", "github"],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/vuejs/vue-loader/tree/master/docs",
Expand Down
3 changes: 2 additions & 1 deletion docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ There are many cool features provided by `vue-loader`:

- ES2015 enabled by default;
- Allows using other Webpack loaders for each part of a Vue component, for example SASS for `<style>` and Jade for `<template>`;
- Allows custom sections in a .vue file that can have custom loader chains applied to them
- Treat static assets referenced in `<style>` and `<template>` as module dependencies and handle them with Webpack loaders;
- Can simulate scoped CSS for each component;
- Supports component hot-reloading during development.
Expand All @@ -34,4 +35,4 @@ But Webpack can do more than that. With "loaders", we can teach Webpack to trans
- Transpile SASS files into plain CSS, then convert it into a JavaScript snippet that insert the resulting CSS as a `<style>` tag;
- Process an image file referenced in HTML or CSS, moved it to the desired destination based on the path configurations, and naming it using its md5 hash.

Webpack is so powerful that when you understand how it works, it can dramatically improve your front-end workflow. Its primary drawback is verbose and complex configuration; but with this guide you should be able to find solutions for most common issues when using Webpack with Vue.js and `vue-loader`.
Webpack is so powerful that when you understand how it works, it can dramatically improve your front-end workflow. Its primary drawback is its verbose and complex configuration; but with this guide you should be able to find solutions for most common issues when using Webpack with Vue.js and `vue-loader`.
12 changes: 12 additions & 0 deletions docs/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@
- [Asset URL Handling](configurations/asset-url.md)
- [Advanced Loader Configuration](configurations/advanced.md)
- [Extracting CSS File](configurations/extract-css.md)
- [Custom Blocks](configurations/custom-blocks.md)
- Workflow
- [Production Build](workflow/production.md)
- [Linting](workflow/linting.md)
- [Testing](workflow/testing.md)
- [Testing with Mocks](workflow/testing-with-mocks.md)
- [Options Reference](options.md)
- [loaders](options.md#loaders)
- [preLoaders](options.md#preloaders)
- [postLoaders](options.md#postloaders)
- [postcss](options.md#postcss)
- [cssSourceMap](options.md#csssourcemap)
- [esModule](options.md#esmodule)
- [preserveWhitespace](options.md#preservewhitespace)
- [transformToRequire](options.md#transformtorequire)
- [buble](options.md#buble)
- [extractCSS](options.md#extractcss)
- [optimizeSSR](options.md#optimizessr)
81 changes: 55 additions & 26 deletions docs/en/configurations/advanced.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,83 @@
# Advanced Loader Configuration

Sometimes you may want to apply a custom loader string to a language instead of letting `vue-loader` infer it. Or you may simply want to overwrite the built-in loader configuration for the default languages. To do that, add a `vue` block in your Webpack config file, and specify the `loaders` option.
Sometimes you may want to:

### Webpack 1.x
1. Apply a custom loader string to a language instead of letting `vue-loader` infer it;

2. Overwrite the built-in loader configuration for the default languages;

3. Pre-process or post-process a specific language block with custom loaders.

To do that, specify the `loaders` option for `vue-loader`:

> Note that `preLoaders` and `postLoaders` are only supported in 10.3.0+

### Webpack 2.x

``` js
// webpack.config.js
module.exports = {
// other options...
module: {
loaders: [
// module.rules is the same as module.loaders in 1.x
rules: [
{
test: /\.vue$/,
loader: 'vue'
loader: 'vue-loader',
options: {
// `loaders` will overwrite the default loaders.
// The following config will cause all <script> tags without "lang"
// attribute to be loaded with coffee-loader
loaders: {
js: 'coffee-loader'
},

// `preLoaders` are attached before the default loaders.
// You can use this to pre-process language blocks - a common use
// case would be build-time i18n.
preLoaders: {
js: '/path/to/custom/loader'
},

// `postLoaders` are attached after the default loaders.
//
// - For `html`, the result returned by the default loader
// will be compiled JavaScript render function code.
//
// - For `css`, the result will be returned by vue-style-loader
// which isn't particularly useful in most cases. Using a postcss
// plugin will be a better option.
postLoaders: {
html: 'babel-loader'
},

// `excludedPreLoaders` should be regex
excludedPreLoaders: /(eslint-loader)/
}
}
]
},
// vue-loader configurations
vue: {
// ... other vue options
loaders: {
// load all <script> without "lang" attribute with coffee-loader
js: 'coffee',
// load <template> directly as HTML string, without piping it
// through vue-html-loader first
html: 'raw'
}
}
}
```

### Webpack 2.x (^2.1.0-beta.25)
### Webpack 1.x

``` js
// webpack.config.js
module.exports = {
// other options...
module: {
// module.rules is the same as module.loaders in 1.x
rules: [
loaders: [
{
test: /\.vue$/,
loader: 'vue',
// vue-loader options goes here
options: {
loaders: {
// ...
}
}
loader: 'vue'
}
]
},
// vue-loader configurations
vue: {
loaders: {
// same configuration rules as above
}
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/en/configurations/asset-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Because `.png` is not a JavaScript file, you will need to configure Webpack to u

The benefits of all this are:

1. `file-loader` allows you to designate where to copy and place the asset file, and how to name it using version hashes for better caching. Moreoever, this also means **you can just place images next to your `*.vue` files and use relative paths based on the folder structure instead of worrying about deployment URLs**. With proper config, Webpack will auto-rewrite the file paths into correct URLs in the bundled output.
1. `file-loader` allows you to designate where to copy and place the asset file, and how to name it using version hashes for better caching. Moreover, this also means **you can just place images next to your `*.vue` files and use relative paths based on the folder structure instead of worrying about deployment URLs**. With proper config, Webpack will auto-rewrite the file paths into correct URLs in the bundled output.

2. `url-loader` allows you to conditionally inline a file as base-64 data URL if they are smaller than a given threshold. This can reduce the amount of HTTP requests for trivial files. If the file is larger than the threshold, it automatically falls back to `file-loader`.
Loading