refactor: Implement dynamic import of Tabler JS in main.jsx to enhance module management and ensure compatibility with window object
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 14m9s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 14m9s
This commit is contained in:
@@ -3,11 +3,14 @@ import ReactDOM from 'react-dom/client'
|
||||
import App from './App.jsx'
|
||||
import './index.css'
|
||||
import '@tabler/core/dist/css/tabler.min.css'
|
||||
import '@tabler/core/dist/js/tabler.min.js';
|
||||
// import 'bootstrap/dist/css/bootstrap.min.css'; // Удалено, Tabler уже включает Bootstrap
|
||||
|
||||
// Динамический импорт Tabler JS и присваивание в window
|
||||
import('@tabler/core/dist/js/tabler.min.js').then((mod) => {
|
||||
window.Tabler = window.Tabler || window.globalThis.Tabler || mod;
|
||||
});
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
</React.StrictMode>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user