airyland / airyland/vux

[Bug Report] NUXT下,执行nuxt build报错

Đang mở
#2,948 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Vue
Star
17.5k
Fork
3.6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### VUX version
2.9.2

### OS/Browsers version
win10

### Vue version
2.5.17-beta.0

### Code

```html
下面是nuxt.config.js的配置

const path = require('path')
const vuxLoader = require('vux-loader')
module.exports = {

/*
** Headers of the page
*/
head: {
title: 'teldmobile',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],

link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
css: [
'vux/src/styles/reset.less',
'vux/src/styles/1px.less'
],
plugins: [
{
src: '~/plugins/vux-plugins',
ssr: false
},
{
src: '~/plugins/vux-components',
ssr: true
}
],
/*
** Customize the progress bar color
*/
loading: { color: '#3B8070' },
/*
** Build configuration
*/
build: {
/*
** Run ESLint on save
*/
// extend (config, { isDev, isClient }) {
// if (isDev && isClient) {
// config.module.rules.push({
// enforce: 'pre',
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// exclude: /(node_modules)/
// })
// }
// }

extend(config, { isDev, isClient }) {

const configs = vuxLoader.merge(config, {
options: {
ssr: true
},
plugins: ['vux-ui', {
name: 'less-theme',
path: path.join(__dirname, './styles/theme.less')
}]
})

return configs
}
},
router: {
middleware: 'teld'
},
modules: [
//'@nuxtjs/axios',
],

axios: {
// proxyHeaders: false
}
}

```

### Steps to reproduce
执行nuxt build

### What is Expected?
希望执行nuxt build能正常通过编译

### What is actually happening?

ERROR in 0.nuxt.bundle.e2e23cd8c3f50b85efa8.js from UglifyJs
Unexpected token: punc ()) [./~/vux/src/components/inline-calendar/props.js:1,15][0.nuxt.bundle.e2e23cd8c3f50b85efa8.js:46,58]

ERROR in vendor.bundle.b674866f0b79219627ec.js from UglifyJs
Unexpected token name «i», expected punc «;» [./~/vux/src/libs/plugin_helper.js:5,11][vendor.bundle.b674866f0b79219627ec.js:8706,11]
Error: Webpack build exited with errors
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\dist\nuxt.js:1161:44
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:272:15
at Compiler.emitRecords (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:367:37)
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:265:12
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:360:11
at next (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\tapable\lib\Tapable.js:154:11)
at Compiler.compiler.plugin (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\tapable\lib\Tapable.js:158:13)
at Compiler.afterEmit (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:357:8)
at Compiler. (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\webpack\lib\Compiler.js:352:14)
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\async\dist\async.js:421:16
at iteratorCallback (C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\async\dist\async.js:998:13)
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\async\dist\async.js:906:16
at D:\NUXT\TeldMobile\node_modules\graceful-fs\graceful-fs.js:43:10
at C:\Users\chendong\AppData\Roaming\npm\node_modules\nuxt\node_modules\graceful-fs\graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:145:20)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.