mirror of
https://github.com/outline/outline.git
synced 2026-11-30 09:00:18 +03:00
Remove webpackChunkName annotation
This commit is contained in:
1 parent
926402b820
commit
78e9dbb336
12 files changed
+22
-136
No files matched your search
@@ -25,26 +25,12 @@ import {
|
||||
import Fade from "./Fade";
|
||||
|
||||
const DocumentHistory = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "document-history" */
|
||||
"~/scenes/Document/components/History"
|
||||
)
|
||||
() => import("~/scenes/Document/components/History")
|
||||
);
|
||||
const DocumentInsights = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "document-insights" */
|
||||
"~/scenes/Document/components/Insights"
|
||||
)
|
||||
);
|
||||
const CommandBar = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "command-bar" */
|
||||
"~/components/CommandBar"
|
||||
)
|
||||
() => import("~/scenes/Document/components/Insights")
|
||||
);
|
||||
const CommandBar = React.lazy(() => import("~/components/CommandBar"));
|
||||
|
||||
const AuthenticatedLayout: React.FC = ({ children }) => {
|
||||
const { ui, auth } = useStores();
|
||||
|
||||
@@ -30,13 +30,7 @@ import { sharedDocumentPath } from "~/utils/routeHelpers";
|
||||
import { isHash } from "~/utils/urls";
|
||||
import DocumentBreadcrumb from "./DocumentBreadcrumb";
|
||||
|
||||
const LazyLoadedEditor = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-shared-editor" */
|
||||
"~/editor"
|
||||
)
|
||||
);
|
||||
const LazyLoadedEditor = React.lazy(() => import("~/editor"));
|
||||
|
||||
export type Props = Optional<
|
||||
EditorProps,
|
||||
|
||||
@@ -53,11 +53,7 @@ const style = {
|
||||
};
|
||||
|
||||
const TwitterPicker = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "twitter-picker" */
|
||||
"react-color/lib/components/twitter/Twitter"
|
||||
)
|
||||
() => import("react-color/lib/components/twitter/Twitter")
|
||||
);
|
||||
|
||||
export const icons = {
|
||||
|
||||
@@ -5,13 +5,7 @@ import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
||||
import useQuery from "~/hooks/useQuery";
|
||||
import type { Props } from "./Table";
|
||||
|
||||
const Table = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "table" */
|
||||
"~/components/Table"
|
||||
)
|
||||
);
|
||||
const Table = React.lazy(() => import("~/components/Table"));
|
||||
|
||||
const TableFromParams = (
|
||||
props: Omit<Props, "onChangeSort" | "onChangePage" | "topRef">
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import * as React from "react";
|
||||
|
||||
const LocaleTime = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "locale-time" */
|
||||
"~/components/LocaleTime"
|
||||
)
|
||||
);
|
||||
const LocaleTime = React.lazy(() => import("~/components/LocaleTime"));
|
||||
|
||||
type Props = React.ComponentProps<typeof LocaleTime> & {
|
||||
onClick?: () => void;
|
||||
|
||||
+1
-4
@@ -119,10 +119,7 @@ window.addEventListener("load", async () => {
|
||||
return;
|
||||
}
|
||||
// https://github.com/googleanalytics/autotrack/issues/137#issuecomment-305890099
|
||||
await import(
|
||||
/* webpackChunkName: "autotrack" */
|
||||
"autotrack/autotrack.js"
|
||||
);
|
||||
await import("autotrack/autotrack.js");
|
||||
window.ga("require", "outboundLinkTracker");
|
||||
window.ga("require", "urlChangeTracker");
|
||||
window.ga("require", "eventTracker", {
|
||||
|
||||
@@ -16,41 +16,11 @@ import useCurrentTeam from "~/hooks/useCurrentTeam";
|
||||
import usePolicy from "~/hooks/usePolicy";
|
||||
import { matchDocumentSlug as slug } from "~/utils/routeHelpers";
|
||||
|
||||
const SettingsRoutes = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "settings" */
|
||||
"./settings"
|
||||
)
|
||||
);
|
||||
const Document = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-document" */
|
||||
"~/scenes/Document"
|
||||
)
|
||||
);
|
||||
const Collection = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "collection" */
|
||||
"~/scenes/Collection"
|
||||
)
|
||||
);
|
||||
const Home = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "home" */
|
||||
"~/scenes/Home"
|
||||
)
|
||||
);
|
||||
const Search = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "search" */
|
||||
"~/scenes/Search"
|
||||
)
|
||||
);
|
||||
const SettingsRoutes = React.lazy(() => import("./settings"));
|
||||
const Document = React.lazy(() => import("~/scenes/Document"));
|
||||
const Collection = React.lazy(() => import("~/scenes/Collection"));
|
||||
const Home = React.lazy(() => import("~/scenes/Home"));
|
||||
const Search = React.lazy(() => import("~/scenes/Search"));
|
||||
|
||||
const RedirectDocument = ({
|
||||
match,
|
||||
|
||||
+5
-35
@@ -6,41 +6,11 @@ import FullscreenLoading from "~/components/FullscreenLoading";
|
||||
import Route from "~/components/ProfiledRoute";
|
||||
import { matchDocumentSlug as slug } from "~/utils/routeHelpers";
|
||||
|
||||
const Authenticated = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-authenticated" */
|
||||
"~/components/Authenticated"
|
||||
)
|
||||
);
|
||||
const AuthenticatedRoutes = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-authenticated-routes" */
|
||||
"./authenticated"
|
||||
)
|
||||
);
|
||||
const SharedDocument = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "shared-document" */
|
||||
"~/scenes/Document/Shared"
|
||||
)
|
||||
);
|
||||
const Login = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "login" */
|
||||
"~/scenes/Login"
|
||||
)
|
||||
);
|
||||
const Logout = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "logout" */
|
||||
"~/scenes/Logout"
|
||||
)
|
||||
);
|
||||
const Authenticated = React.lazy(() => import("~/components/Authenticated"));
|
||||
const AuthenticatedRoutes = React.lazy(() => import("./authenticated"));
|
||||
const SharedDocument = React.lazy(() => import("~/scenes/Document/Shared"));
|
||||
const Login = React.lazy(() => import("~/scenes/Login"));
|
||||
const Logout = React.lazy(() => import("~/scenes/Logout"));
|
||||
|
||||
export default function Routes() {
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import * as React from "react";
|
||||
|
||||
const MultiplayerEditor = React.lazy(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "preload-multiplayer-editor" */
|
||||
"./MultiplayerEditor"
|
||||
)
|
||||
);
|
||||
const MultiplayerEditor = React.lazy(() => import("./MultiplayerEditor"));
|
||||
|
||||
export default MultiplayerEditor;
|
||||
@@ -8,10 +8,7 @@ export async function loadPolyfills() {
|
||||
|
||||
if (!supportsResizeObserver()) {
|
||||
polyfills.push(
|
||||
import(
|
||||
/* webpackChunkName: "resize-observer" */
|
||||
"@juggle/resize-observer"
|
||||
).then((module) => {
|
||||
import("@juggle/resize-observer").then((module) => {
|
||||
window.ResizeObserver = module.ResizeObserver;
|
||||
})
|
||||
);
|
||||
|
||||
@@ -18,10 +18,7 @@ export function createMathView(displayMode: boolean) {
|
||||
getPos: boolean | (() => number)
|
||||
): MathView => {
|
||||
// dynamically load katex styles and fonts
|
||||
import(
|
||||
/* webpackChunkName: "katex" */
|
||||
"katex/dist/katex.min.css"
|
||||
);
|
||||
import("katex/dist/katex.min.css");
|
||||
|
||||
const pluginState = MATH_PLUGIN_KEY.getState(view.state);
|
||||
if (!pluginState) {
|
||||
|
||||
@@ -57,10 +57,7 @@ function getNewState({
|
||||
return diagramWrapper;
|
||||
}
|
||||
|
||||
import(
|
||||
/* webpackChunkName: "mermaid" */
|
||||
"mermaid"
|
||||
).then((module) => {
|
||||
import("mermaid").then((module) => {
|
||||
module.default.initialize({
|
||||
startOnLoad: true,
|
||||
flowchart: {
|
||||
|
||||
Reference in new issue
Block a user