This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 366
[BUG] remax 1.0.17 在 [email protected] 版本下打包结果无法正常运行 #238
Labels
bug
Something isn't working
Comments
npm 的版本呢 |
似乎是 node: 10.16.1 await Promise.all([
files.map(async (file) => {
const chunk = bundle[file];
if (isRemaxEntry(chunk)) {
const filePath = Object.keys(chunk.modules)[0];
const page = pages.find(p => p.file === filePath);
if (page) {
console.log(`page:`, page);
const template = await createTemplate(file, adapter);
console.log(`tempalte:`, template);
templateAssets.push(template);
const config = await createPageManifest(options, file, adapter.name, page, context);
console.log(`config:`, config);
if (config) {
templateAssets.push(config);
}
}
}
}),
]);
console.log(`assets`);
templateAssets.forEach(file => {
this.emitFile(Object.assign({ type: 'asset' }, file));
}); 输出 🚀 启动 watch
🚚 编译...
100% (76): /Users/aepkill.h.hou/workspace/mohurd-jzgr/BuildingWorkerApplet/node_modules/scheduler/cjs/scheduler-tracing.development.jpage: { path: 'pages/index/index',
file:
'/Users/aepkill.h.hou/workspace/mohurd-jzgr/BuildingWorkerApplet/src/pages/index/index.tsx' }
assets <--- !!!!注意这里!!!!
tempalte: { fileName: 'pages/index/index.axml',
source:
'<import-sjs name="helper" from="../../helper.sjs" />\n<import src="../../base.axml" />\n<template is="REMAX_TPL" data="{{tree: helper.reduce(action)}}" />' }
config: undefined
💡 完成 |
@newset 你看能不能排查一下这个问题 |
改成: await Promise.all(files.map(async (file) => {
const chunk = bundle[file];
if (isRemaxEntry(chunk)) {
const filePath = Object.keys(chunk.modules)[0];
const page = pages.find(p => p.file === filePath);
if (page) {
console.log(`page:`, page);
const template = await createTemplate(file, adapter);
console.log(`tempalte:`, template);
templateAssets.push(template);
const config = await createPageManifest(options, file, adapter.name, page, context);
console.log(`config:`, config);
if (config) {
templateAssets.push(config);
}
}
}
})); 就可以了 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
bug 描述
remax和remax-cli在升级到1.0.17版本时,如果node的版本为10.x.x,dist目录下生成的文件无法正常运行。
根据提示信息看是缺少wxml文件。
复现步骤
附有最小复现demo链接,请将Node环境设置为10.x.x(例:10.16.2)进行测试(目前已知Node版本在12.x.x时正常)
复现代码
https://github.com/elowes/remax-update-repro
版本信息:
The text was updated successfully, but these errors were encountered: