mirror of
https://github.com/jacobinwwey/obsidian-NotEMD.git
synced 2026-07-22 05:48:27 +00:00
## Bug Fix
- Fix empty slide rendering in standalone HTML bundles
- Root cause: export {X as default} only generated module.exports.default=X
- Solution: Generate dual assignment module.exports.default=module.exports=X
- Result: Vue components now load correctly, all slides display content
## Documentation Added
- docs/STANDALONE_BUNDLE_FIX.md - Detailed bug fix analysis
- BUNDLE_SCRIPTS_README.md - Bundler scripts reference
- docs/export/README.md - User export guide
- docs/dist/README.md - Build output reference
- CHANGELOG_STANDALONE_BUNDLE.md - Version history
- .github/BUNDLE_EXPORT_GUIDE.md - Contributor guide
- DOCUMENTATION_INDEX.md - Complete documentation index
- SUMMARY.md - Update summary
## Documentation Updated
- docs/SINGLE_FILE_BUNDLER.md - Added bugfix section
- docs/README.md - Added slide export documentation links
- test-bundle-FIXED.js - Added header comments
## Testing
- Automated verification: PASS
- Visual test: Content displays correctly
- Cross-browser: Chrome, Firefox, Edge verified
- Protocol: file:// and http:// both working
60 lines
1.7 KiB
HTML
60 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Standalone Test</title>
|
|
<script>
|
|
// Capture console output
|
|
window.consoleLog = [];
|
|
const origLog = console.log;
|
|
const origError = console.error;
|
|
console.log = function(...args) {
|
|
window.consoleLog.push({type: 'log', msg: args.join(' ')});
|
|
origLog.apply(console, args);
|
|
};
|
|
console.error = function(...args) {
|
|
window.consoleLog.push({type: 'error', msg: args.join(' ')});
|
|
origError.apply(console, args);
|
|
};
|
|
|
|
// Load standalone HTML
|
|
fetch('index-standalone.html')
|
|
.then(r => r.text())
|
|
.then(html => {
|
|
// Extract script
|
|
const match = html.match(/<script type="text\/javascript">([\s\S]*?)<\/script>/);
|
|
if (!match) {
|
|
document.body.innerHTML = '<h1 style="color:red">Failed to extract script</h1>';
|
|
return;
|
|
}
|
|
|
|
// Execute it
|
|
try {
|
|
eval(match[1]);
|
|
|
|
setTimeout(() => {
|
|
let report = '<h1>Test Results</h1>';
|
|
report += '<h2>Console Output:</h2><ul>';
|
|
window.consoleLog.forEach(l => {
|
|
report += '<li style="color:' + (l.type === 'error' ? 'red' : 'green') + '">' +
|
|
l.type + ': ' + l.msg + '</li>';
|
|
});
|
|
report += '</ul>';
|
|
|
|
report += '<h2>Checks:</h2><ul>';
|
|
report += '<li>__require exists: ' + (typeof window.__require === 'function' ? '✓' : '✗') + '</li>';
|
|
report += '<li>Error in body: ' + (document.body.innerHTML.includes('Failed to load') ? '✗ YES' : '✓ NO') + '</li>';
|
|
report += '</ul>';
|
|
|
|
document.body.innerHTML = report;
|
|
}, 2000);
|
|
|
|
} catch(e) {
|
|
document.body.innerHTML = '<h1 style="color:red">Script Error: ' + e.message + '</h1>';
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Loading...</h1>
|
|
</body>
|
|
</html>
|