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

can't import with destructuring #55

Open
laozhujia opened this issue Jun 6, 2018 · 1 comment
Open

can't import with destructuring #55

laozhujia opened this issue Jun 6, 2018 · 1 comment

Comments

@laozhujia
Copy link

can't import with destructuring

import { List } form 'vum/src/components/list/index.vue'
vue文件写成这样的,怎么解析,应该是js文件吧。

<script>
import List from './list'
import ListItem from './item'

export default {
  List,
  ListItem
}
</script>

<style lang="less">
@import 'list.less';
</style>

我不知道前辈们都是怎么用的,我是真不会用,第一次见到yarn add 后的库,还要引用src 下面的文件的,还是less 未编译的,
而且less里还用到 javascript的 还要设置
{ loader: 'less-loader', options: { javascriptEnabled: true } }
设置完发现还是不能用,找了半天原因,发现如上奇葩的vue文件,我vue-cli的vue-loader 还真无法解析这文件

@laozhujia
Copy link
Author

看了下,是我yarn 安装的版本是有这个bug的,但是看github上的源码是正确的js 文件

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

1 participant