We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
最近做Shopify插件,由于操作dom实在太麻烦,最终还是选择用vue,不过由于Shopify里面不能使用vue-cli,所以需要在vue-cli里面写好组件然后打包成库(lib)或者web-component。
vue-cli-service build --target lib --name myLib [entry]
index.js
import XXX from 'xxxx'; export default XXX;
Vue是外置的,所以需要引入一个全局Vue。
vue-cli-service build --target wc --name my-element [entry]
该方式打包的入口必须是一个.vue文件,名字多单词用“-”隔开
注意:该方式只能通过ref来获取节点,ID不生效。
由于Shopify开发插件需要用到fabric.js,而fabric.js又需要用ID去绑定节点,所以最终用的打包库的方式。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
最近做Shopify插件,由于操作dom实在太麻烦,最终还是选择用vue,不过由于Shopify里面不能使用vue-cli,所以需要在vue-cli里面写好组件然后打包成库(lib)或者web-component。
打包成库
index.js
Vue是外置的,所以需要引入一个全局Vue。
打包成web-component
该方式打包的入口必须是一个.vue文件,名字多单词用“-”隔开
Vue是外置的,所以需要引入一个全局Vue。
注意:该方式只能通过ref来获取节点,ID不生效。
打包方式选择
由于Shopify开发插件需要用到fabric.js,而fabric.js又需要用ID去绑定节点,所以最终用的打包库的方式。
The text was updated successfully, but these errors were encountered: