mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 09:27:04 +02:00
chore: upgrade to TS 4.7, compile with NodeNext (#7586)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
b503523f66
commit
b4d93b9bd0
62 changed files with 225 additions and 195 deletions
15
packages/docusaurus-plugin-pwa/src/deps.d.ts
vendored
Normal file
15
packages/docusaurus-plugin-pwa/src/deps.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// TODO incompatible declaration file: https://github.com/unjs/webpackbar/pull/108
|
||||
declare module 'webpackbar' {
|
||||
import webpack from 'webpack';
|
||||
|
||||
export default class WebpackBarPlugin extends webpack.ProgressPlugin {
|
||||
constructor(options: {name: string; color?: string});
|
||||
}
|
||||
}
|
|
@ -139,7 +139,7 @@ async function registerSW() {
|
|||
if (!offlineMode) {
|
||||
return sendSkipWaiting();
|
||||
}
|
||||
return import('./renderReloadPopup').then(({default: renderReloadPopup}) =>
|
||||
return import('./renderReloadPopup.js').then(({renderReloadPopup}) =>
|
||||
renderReloadPopup({
|
||||
onReload() {
|
||||
wb.addEventListener('controlling', () => {
|
||||
|
|
|
@ -20,7 +20,7 @@ const createContainer = () => {
|
|||
return container;
|
||||
};
|
||||
|
||||
export default function renderReloadPopup(props: Props): Promise<void> {
|
||||
export function renderReloadPopup(props: Props): Promise<void> {
|
||||
const container = getContainer() ?? createContainer();
|
||||
return import('@theme/PwaReloadPopup').then(({default: ReloadPopup}) => {
|
||||
ReactDOM.render(<ReloadPopup {...props} />, container);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue