mirror of
https://github.com/jacobinwwey/obsidian-NotEMD.git
synced 2026-07-22 12:40:25 +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
48 lines
1.4 KiB
HTML
48 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Diagnostic Test</title>
|
|
<script>
|
|
// Capture all errors
|
|
window.errors = [];
|
|
window.onerror = function(msg, url, line, col, error) {
|
|
window.errors.push({type: 'error', msg, url, line, col, error: error?.toString()});
|
|
console.error('ERROR:', msg, url, line, col, error);
|
|
};
|
|
|
|
window.addEventListener('unhandledrejection', function(event) {
|
|
window.errors.push({type: 'promise', reason: event.reason?.toString()});
|
|
console.error('PROMISE REJECTION:', event.reason);
|
|
});
|
|
|
|
// Load the standalone HTML in iframe
|
|
window.addEventListener('load', function() {
|
|
const iframe = document.createElement('iframe');
|
|
iframe.src = 'index-standalone.html';
|
|
iframe.style.width = '100%';
|
|
iframe.style.height = '600px';
|
|
document.getElementById('container').appendChild(iframe);
|
|
|
|
setTimeout(function() {
|
|
const results = document.getElementById('results');
|
|
results.innerHTML = '<h2>Console Errors:</h2><pre>' +
|
|
JSON.stringify(window.errors, null, 2) + '</pre>';
|
|
|
|
// Try to get iframe errors
|
|
try {
|
|
const iframeErrors = iframe.contentWindow.errors || [];
|
|
results.innerHTML += '<h2>IFrame Errors:</h2><pre>' +
|
|
JSON.stringify(iframeErrors, null, 2) + '</pre>';
|
|
} catch(e) {
|
|
results.innerHTML += '<p>Cannot access iframe: ' + e.message + '</p>';
|
|
}
|
|
}, 3000);
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Standalone HTML Diagnostic</h1>
|
|
<div id="container"></div>
|
|
<div id="results"></div>
|
|
</body>
|
|
</html>
|