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

[Bug Report] 用vue-cli 3.0时,无法结束进程 #73

Open
dingyi1993 opened this issue Nov 28, 2018 · 4 comments
Open

[Bug Report] 用vue-cli 3.0时,无法结束进程 #73

dingyi1993 opened this issue Nov 28, 2018 · 4 comments

Comments

@dingyi1993
Copy link

vux-loader version

1.2.9

OS/Browsers version

linux 64

Vue version

2.5.16

Code

  ...
  configureWebpack: config => {
    const vuxLoaderConfig = {
      options: {},
      plugins: [
        {
          name: 'vux-ui'
        },
        {
          name: 'less-theme',
          path: 'src/assets/less/theme.less' // 相对项目根目录路径
        }
      ]
    }
    if (process.env.NODE_ENV === 'production') {
      vuxLoaderConfig.plugins.concat({
        name: 'duplicate-style'
      })
    }
    require('vux-loader').merge(config, vuxLoaderConfig)
  },
  ...

Steps to reproduce

用@vue/cli 3.0,在 vue.config.js 中添加上面的配置,运行 yarn vue-cli-service inspect > output.js,会导致进程无法结束,运行yarn vue-cli-service build有小概率不结束进程,定位发现是上报使用情况的定时器在某些情况下未清除(这是代码位置)。

What is Expected?

@vue/cli 3.0中,能正常结束进程。

What is actually happening?

并没有结束进程。

@lx307697527
Copy link

遇到了同样的问题 请问有解决办法吗

@dingyi1993
Copy link
Author

遇到了同样的问题 请问有解决办法吗

fork出来一份,自己解决。

是下面这句上报的引用中,写了个很长时间的定时器导致。

require('./libs/report')({

@lx307697527
Copy link

可以直接把这句 global.reportInterval = setInterval(report, 1200000)
注释掉,然后发到公司自己的npm源上替换现在有问题的包.

@xuqihua
Copy link

xuqihua commented Sep 10, 2021

同问题 头都大了
先是配置问题,不能配置externals ,配了会有问题,去掉externals就好了
然后现在能编译正确,但是无法结束进程

要不是老项目要维护真的不想搞

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

3 participants