Comments (5)
这个问题比较复杂:组件工程 src
下面的除了 index.js
的系列的依赖以外,其他的都会平行复制到 lib
,这个操作是为了满足原生小程序组件的需求,但是如果用户 targets
里包含了 miniapp
,即此时需求是既要保留原生小程序的实现,又要有小程序的产物(小程序编译时和运行时结合的情况),从而产生的命名的冲突是否需要提示给用户?
from rax-app.
以及 @ChrisCindy 的 pr 修复的是第一个问题,第二个问题还需要 @yacheng 看下
from rax-app.
build.json
{
"plugins": [
[
"build-plugin-rax-component",
{
"type": "rax",
"targets": ["web", "miniapp"]
}
]
]
}
插件版本
"@alib/build-scripts": "^0.1.0",
"build-plugin-rax-component": "^0.2.1",
实际测试,并不会生成 lib/miniapp-wechat 目录
from rax-app.
@yacheng @SoloJiang 所说的实际上是另一个问题,以 rax-canvas 为例,当 src 下存在 miniapp 目录并且代码是 TS 时,编译后会直接将 miniapp 目录平移到 lib 目录,而无视 targets 配置。个人感觉这个问题不是很严重,比较边界。
from rax-app.
build.json
{ "plugins": [ [ "build-plugin-rax-component", { "type": "rax", "targets": ["web", "miniapp"] } ] ] }
插件版本
"@alib/build-scripts": "^0.1.0", "build-plugin-rax-component": "^0.2.1",
实际测试,并不会生成 lib/miniapp-wechat 目录
raxjs/rax-components#150 参见这个 pr 的 rax-canvas,build.json
中 targets
只保留 miniapp
from rax-app.
Related Issues (20)
- @babel/traverse 7.17.10 变更导致的问题 HOT 1
- .tsx 文件 sourceMap 失效 HOT 1
- 提供完善的 Rax 项目单元测试文档
- 自定义 docuemnt 在插件中注入 meta 标签异常 HOT 1
- Terser Plugin 在开启 webpack 5 后报错 HOT 1
- JSX To HTML 需要兼容标签闭合的情况
- 开启 keepalive 后,组件在路由跳转前重复执行了一次 useEffect HOT 1
- plugin-rax-compat-react 报错
- .mjs is not included with babel-loader HOT 2
- npm package `eslint-plugin-module`
- 优化 SSR 代码架构,用 ejs 替换现有 loader 渲染
- [Bug] tabHeader 未在 routes 中单独配置 path & source 时无法构建出 document
- [Bug] SSR 场景下,更新 Document 未触发 document 的重新构建 HOT 1
- [Bug] 构建时对不合理的对象属性类型声明报错
- [BUG] 3.8.x 版本在 windows 系统中 tabbar 渲染出错 HOT 1
- node 构建任务过滤所有 hot 相关代码注入
- "rax-app"”没有导出的成员“usePageShare” HOT 1
- [Feature] 各容器调试链接统一,根据请求头返回对应的内容
- [Feature] PHA 应用同时支持 tabBar 和 非 tabBar 页面
- [Bug] Windows11 系统下,有node-gyp @8.2.0 ,有[email protected] | win32 | x64,有Python3.10.1,有Microsoft Visual Studio\2019\BuildTools,却还是报错导致安装失败,这直接导致rax-app无法安装 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rax-app.