Skip to content

Invalid or unexpected token #3356

@ghost

Description

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.4

Environment

Vue 2 (Nuxt.js)

Reproduction link

https://none.com

Steps to reproduce

//

What is expected?

it should work

What is actually happening?

SyntaxError
Invalid or unexpected token


I'm using Nuxt.js.

nuxt.config.js

plugins: [
'@/plugins/ant-design'
],
build: {
babel: {
plugins: [
['import', { 'libraryName': 'ant-design-vue', 'style': true }]
]
},
loaders: {
less: {
lessOptions: {
javascriptEnabled: true,
},
}
}
}

ant-design.js

import Vue from 'vue'

import { Button } from 'ant-design-vue'

Vue.component(Button)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions