vuecli3 开发环境能编译,生产环境却不能编译
小白无能为力,求dalao指点。我也没用async.js啊
报错信息如下:
$ vue-cli-service build --mode production --dest dist --target app --dashboard
- Building for production…
ERROR Error: No module factory available for dependency type: CssDependency
Error: No module factory available for dependency type: CssDependency at addDependency (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:800:12) at iterationOfArrayCallback (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:208:3) at addDependenciesBlock (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:816:5) at Compilation.processModuleDependencies (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:827:4) at afterBuild (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:954:15) at buildModule.err (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:998:11) at callback (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:734:5) at module.build.error (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\Compilation.js:782:12) at handleParseResult (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\NormalModule.js:478:12) at doBuild.err (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\NormalModule.js:500:6) at runLoaders (F:\VUE\workspace\angeltechnologygroup\node_modules_webpack@4.41.5@webpack\lib\NormalModule.js:358:12) at F:\VUE\workspace\angeltechnologygroup\node_modules_loader-runner@2.4.0@loader-runner\lib\LoaderRunner.js:373:3 at iterateNormalLoaders (F:\VUE\workspace\angeltechnologygroup\node_modules_loader-runner@2.4.0@loader-runner\lib\LoaderRunner.js:214:10) at F:\VUE\workspace\angeltechnologygroup\node_modules_loader-runner@2.4.0@loader-runner\lib\LoaderRunner.js:186:6 at context.callback (F:\VUE\workspace\angeltechnologygroup\node_modules_loader-runner@2.4.0@loader-runner\lib\LoaderRunner.js:111:13) at childCompiler.runAsChild (F:\VUE\workspace\AngelTechnologyGroup\node_modules_mini-css-extract-plugin@0.9.0@mini-css-extract-plugin\dist\loader.js:199:12) F:\VUE\workspace\angeltechnologygroup\node_modules_neo-async@2.6.1@neo-async\async.js:16 throw new Error(‘Callback was already called.’); ^
Error: Callback was already called. at throwError (F:\VUE\workspace\angeltechnologygroup\node_modules_neo-async@2.6.1@neo-async\async.js:16:11) at F:\VUE\workspace\angeltechnologygroup\node_modules_neo-async@2.6.1@neo-async\async.js:2818:7 at process._tickCallback (internal/process/next_tick.js:61:11)
Total task duration: 2.61s
vue配置如下:
// vue.config.js
module.exports = {
chainWebpack: config => {
config.module
.rule('md')
.test(/\.md$/)
.use('html-loader')
.loader('html-loader')
.end()
.use('markdown-loader')
.loader('markdown-loader')
.end()
}
}