vue create antsy
> default (babel, eslint)
cd antsy
vue add ant-design
> Import on demand
> en_US
This fails for me in postinstall. (Fully import works.) Fixed with as per advanced guides from ant docs (npm i babel-plugin-import -D and modify babel.config.js before adding plugin).
EDIT: And furthermore, still needed to remove LocaleProvider from src/plugins/ though the install was was without errors (errors shown in dev tools console). ๐
Would you kindly update deps so it's not manual.
(Also, there are some prototype pollution warnings on npm audit)
Full error print out below (cleared funding and vulnerabilities notes).
Cheers :)
> vue add ant-design
๐ฆ Installing vue-cli-plugin-ant-design...
+ vue-cli-plugin-ant-design@1.0.0
added 1 package from 1 contributor and audited 25497 packages in 4.97s
(fund and vulnerabilities notes)
โ Successfully installed plugin: vue-cli-plugin-ant-design
? How do you want to import Ant-Design-Vue? Import on demand
? Choose the locale you want to load en_US
๐ Invoking generator for vue-cli-plugin-ant-design...
๐ฆ Installing additional dependencies...
> core-js@2.6.11 postinstall /Users/Nikola/dev/antsy/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> ant-design-vue@1.5.3 postinstall /Users/Nikola/dev/antsy/node_modules/ant-design-vue
> node scripts/postinstall || echo "ignore"
added 68 packages from 93 contributors and audited 25642 packages in 5.029s
42 packages are looking for funding
run `npm fund` for details
found 5 vulnerabilities (4 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
โ Running completion hooks...error: 'LocaleProvider' is not defined (no-undef) at src/plugins/ant-design-vue.js:3:15:
1 | import Vue from 'vue'
2 | import { Pagination, Button } from 'ant-design-vue'
> 3 | Vue.component(LocaleProvider.name, LocaleProvider)
| ^
4 | Vue.component(Pagination.name, Pagination)
5 | Vue.component(Button.name, Button)
6 |
error: 'LocaleProvider' is not defined (no-undef) at src/plugins/ant-design-vue.js:3:36:
1 | import Vue from 'vue'
2 | import { Pagination, Button } from 'ant-design-vue'
> 3 | Vue.component(LocaleProvider.name, LocaleProvider)
| ^
4 | Vue.component(Pagination.name, Pagination)
5 | Vue.component(Button.name, Button)
6 |
2 errors found.
This fails for me in postinstall. (Fully import works.) Fixed with as per advanced guides from ant docs (
npm i babel-plugin-import -D
and modifybabel.config.js
before adding plugin).EDIT: And furthermore, still needed to remove LocaleProvider from
src/plugins/
though the install was was without errors (errors shown in dev tools console). ๐Would you kindly update deps so it's not manual.
(Also, there are some prototype pollution warnings on npm audit)
Full error print out below (cleared funding and vulnerabilities notes).
Cheers :)