Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jbone-cms-admin前端构建时报component: () => import('@/view/single-page/home') #23

Open
miguanxiong opened this issue Jan 31, 2019 · 1 comment

Comments

@miguanxiong
Copy link

这个在ivew-admin中已经解决,在webapp目录添加
Uploading 图片.png…

@wimigame
Copy link

wimigame commented Feb 14, 2019

我添加了两个文件修改了一处代码可以尝试
(1) .eslintrc.js

module.exports = {
  root: true,
  'extends': [
    'plugin:vue/essential',
    '@vue/standard'
  ],
  rules: {
    // allow async-await
    'generator-star-spacing': 'off',
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
    'no-undef': 'off',
    'camelcase': 'off'
  },
  parserOptions: {
    parser: 'babel-eslint'
  }
}

(2) .babelrc

{
  "presets": [
    "@vue/app"
  ]
}

(3)修改了一处代码 webapp\vue.config.js

productionSourceMap: false 下面添加如下代码

css: {
  loaderOptions: { // 向 CSS 相关的 loader 传递选项
    less: {
      javascriptEnabled: true
    }
  }
}

执行 npm install && npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants