Skip to content

Commit

Permalink
bugfix: #1371
Browse files Browse the repository at this point in the history
  • Loading branch information
hucq committed Feb 13, 2019
1 parent 95e6d6e commit 30c4b99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ module.exports = function (content) {
// 针对 entry 的 main.js 处理 page 和 app 的入口文件和配置等
const mpOptions = loaderUtils.getOptions(this) || {}

if (!mpOptions.fileExt) {
throw new Error(
'[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'
)
}
if (mpOptions.checkMPEntry) {
return compileMP.call(this, content, mpOptions)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpvue-loader",
"version": "1.2.0",
"version": "1.2.2",
"description": "mpvue single-file component loader for Webpack",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 30c4b99

Please sign in to comment.