mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-24 02:46:39 +00:00
* Remove IE polyfills and special casing * dashboard: remove `resize-observer-polyfill` * deps: remove url-parse to use global `URL` instead * Update documentation for browser support * Add a migration guide * Update e2e test platforms * Remove polyfills from examples and add those missing in CDN bundle * Use Node.js v16.x on CI because of `AbortController` * Update bundle builder to produce two builds: `uppy.js` without polyfills, `uppy.legacy.js` with polyfills. * Upgrade create-react-app deps * remove null coalescing operator as it's not supported by the build chain * disable Safari testing (for now) Co-authored-by: Renée Kooi <renee@kooi.me>
20 lines
587 B
JavaScript
20 lines
587 B
JavaScript
const DragDrop = require('./DragDrop.js')
|
|
const Dashboard = require('./Dashboard.js')
|
|
|
|
switch (window.location.pathname.toLowerCase()) {
|
|
case '/':
|
|
case '/dashboard.html': Dashboard(); break
|
|
case '/dragdrop.html': DragDrop(); break
|
|
}
|
|
|
|
if ('serviceWorker' in navigator) {
|
|
// eslint-disable-next-line compat/compat
|
|
navigator.serviceWorker
|
|
.register('/sw.js')
|
|
.then((registration) => {
|
|
console.log('ServiceWorker registration successful with scope: ', registration.scope)
|
|
})
|
|
.catch((error) => {
|
|
console.log(`Registration failed with ${error}`)
|
|
})
|
|
}
|