vue-cli搭建项目
- yarn global add @vue/cli –ok
- vue –version 确认 –ok
- vue create
--ok - vue2 + eslint + typescript + babel + vue-router + vuex + less + jest 选择配置 –ok
- antd 引入 –ok
- loadsh –ok
- echarts –ok
- axios –ok
问题:import HelloWorld from “@/components/HelloWorld.vue”; 报错: Cannot find module ‘@/components/HelloWorld.vue’ or its corresponding type declarations.
1
工作区根目录就是项目目录
问题:yarn 引入 ant-design-vue 报错: Uncaught TypeError: (0 , vueWEBPACK_IMPORTED_MODULE_3.createVNode) is not a function
1
2
3
4
5
因为ant-design-vue版本过高
yarn remove ant-design-vue
yarn add ant-design-vue@1.7.2
ps vue2 对应的 1.x
prettier
1
2
3
4
5
6
7
8
{
"singleQuote": true,
"printWidth": 115,
"proseWrap": "always",
"semi": false,
"trailingComma": "none",
"htmlWhitespaceSensitivity": "ignore"
}
This post is licensed under CC BY 4.0 by the author.