Skip to content

Commit 30c4b99

Browse files
committed
bugfix: #1371
1 parent 95e6d6e commit 30c4b99

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/loader.js

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ module.exports = function (content) {
5151
// 针对 entry 的 main.js 处理 page 和 app 的入口文件和配置等
5252
const mpOptions = loaderUtils.getOptions(this) || {}
5353

54+
if (!mpOptions.fileExt) {
55+
throw new Error(
56+
'[mpvue-loader] need "fileExt" option in file "build/vue-loader.conf.js",init a new project and copy the directory "build/" to this porject, or just check the "fileExt" option'
57+
)
58+
}
5459
if (mpOptions.checkMPEntry) {
5560
return compileMP.call(this, content, mpOptions)
5661
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mpvue-loader",
3-
"version": "1.2.0",
3+
"version": "1.2.2",
44
"description": "mpvue single-file component loader for Webpack",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)