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

vue-cli3项目中,build时候vux/loader 报错 #3687

Closed
MonsterGoGoGo opened this issue Apr 15, 2020 · 2 comments
Closed

vue-cli3项目中,build时候vux/loader 报错 #3687

MonsterGoGoGo opened this issue Apr 15, 2020 · 2 comments
Milestone

Comments

@MonsterGoGoGo
Copy link

我的vue.config.js配置

  configureWebpack: config => {
    require('@vux/loader').merge(config, {
      plugins: ['vux-ui']
    })
  }

vux及vux-loader版本

"vux": "^2.9.4",
"vux-loader": "^1.2.9"

npm run serve/build 时报错如下内容

Error: [BABEL] unknown: Preset /* your preset */ requires a filename to be set when babel is called directly,

babel.transform(code, { filename: 'file.ts', presets: [/* your preset */] });

See https://babeljs.io/docs/en/options#filename for more information.
    at validateIfOptionNeedsFilename (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:254:11)
    at options.overrides.forEach.overrideOptions (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:266:52)
    at Array.forEach (<anonymous>)
    at validatePreset (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:266:25)
    at loadPresetDescriptor (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:273:3)
    at loadPresetDescriptor.next (<anonymous>)
    at recurseDescriptors (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:94:28)
    at recurseDescriptors.next (<anonymous>)
    at loadFullConfig (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/config/full.js:122:6)
    at loadFullConfig.next (<anonymous>)
    at Function.transform (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/transform.js:25:45)
    at transform.next (<anonymous>)
    at evaluateSync (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/gensync/index.js:244:28)
    at Function.sync (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/gensync/index.js:84:14)
    at Object.transform (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@babel/core/lib/transform.js:36:54)
    at transform (/Users/gaodan/Desktop/code/recruit-erp-mobile/node_modules/@vux/loader/src/libs/import-parser-v2.js:7:19)

这个是什么原因~有好的办法解决吗

@wudimenghuan
Copy link

同样出现这个问题了

@caozhong1996 caozhong1996 added this to the 2.9.5 milestone Jun 5, 2021
@caozhong1996
Copy link
Collaborator

see #3778

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