Vue 开发 Mendix 组件

请确保已经安装完一下命令:

1
npm node webpack zip cp 命令

1. 安装 mendix-cli 

1
npm install mendix-cli -g

2. 创建widget项目

1
mendix create widgetName

3. 执行命令

1
cd widgetName && npm install

 4.修改webpack.config.js

1
scripts: ['node package.xml.js && cd build && zip -r '+widget+'.mpk * && cp '+widget+'.mpk 构建成功后cp的目录名称'],

5.执行命令:

1
npm run build

之后会出现build目录 会出现.mpk widget文件

如果选择iview构建模板,会出现其他不同情况问题,需要添加一些loadder

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"dependencies": {
    "iview": "3.3.3",
    "view-design": "^4.5.0",
    "vue": "^2.6.8"
  },
  "devDependencies": {
    "prop-types": "^15.7.2",
    "@babel/core": "^7.3.4",
    "@babel/plugin-proposal-object-rest-spread": "^7.4.3",
    "@babel/plugin-syntax-dynamic-import": "^7.2.0",
    "@babel/plugin-transform-runtime": "^7.4.3",
    "@babel/preset-env": "^7.3.4",
    "babel": "^6.23.0",
    "babel-loader": "^8.0.5",
    "babel-plugin-import": "^1.11.0",
    "babel-plugin-syntax-jsx": "^6.18.0",
    "babel-plugin-transform-vue-jsx": "^3.7.0",
    "babel-polyfill": "^6.26.0",
    "babel-register": "^6.26.0",
    "babel-runtime": "^6.26.0",
    "webpack": "^4.29.6",
    "webpack-shell-plugin-next": "^0.6.4",
    "iview-loader": "^1.2.2",
    "file-loader": "^3.0.1",
    "copy-webpack-plugin": "^4.5.1",
    "css-loader": "^2.1.0",
    "html-loader": "^0.5.5",
    "node-sass": "^4.11.0",
    "sass-loader": "^7.1.0",
    "url-loader": "^1.1.2",
    "style-loader": "^0.23.1",
    "vue-loader": "^15.7.0",
    "vue-template-compiler": "^2.6.8",
    "webpack-cli": "^3.2.3"
  },

  

posted @   qukaige  阅读(343)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
历史上的今天:
2019-05-10 Flask 热更新
点击右上角即可分享
微信分享提示