diff --git a/lib/loader.js b/lib/loader.js index 704c17f..1f03064 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -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) } diff --git a/package.json b/package.json index 4c4ce3e..9728772 100644 --- a/package.json +++ b/package.json @@ -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": {