如何设置vue配置以使构建正常工作?

时间:2018-05-22 10:45:32

标签: javascript vue.js vue-cli

我知道这个问题之前曾多次被问过,但我只得到部分答案,例如

vue.config.js

{
    test: /\.js$/,
    use: 'babel-loader',
    include: [path.resolve(__dirname, 'app/src'), // make src the root of transpiling, so if your problematic code is under anywhere in src/ Babel will pick it up.
                 //path.resolve(__dirname, 'app/src/renderer') // this is the original line which cages Babel within the renderer/ folder.
              ],
    exclude: /node_modules/
  },

随后是OP评论

  

是的,钉了它。这个path.resolve(__ dirname,' app / src')确实如此   遗漏的部分:< 3

Source

我没有时间浏览Vue-CLI的整个文档,所以有人可以解释我如何才能npm run build并在我的{index.html dist/ 1}}文件夹哪个有效?

现在,当我打开index.html

时,我只是得到一个空白页面

我按照标准的vue-cli文档来设置项目。

0 个答案:

没有答案