index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/config | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/config/[toolkit].[type]/page.tsx | import React from 'react';
import { useSnapshot } from 'valtio';
import { useParams } from '@modern-js/runtime/router';
import { useStore } from '@/client/stores';
import { ObjectInspector } from '@/client/components/ObjectInspector';
const Page: React.FC = () => {
const $store = useStore();
const store = useSnaps... | 6,600 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/layout.config.tsx | import { SelectLink } from '@/client/components/SelectLink';
export const handle = {
breadcrumb: [
{ title: 'Context' },
{
title: (
<SelectLink
items={[
{ to: '/context/builder', title: 'Builder' },
{ to: '/context/framework', title: 'Framework' },
]}... | 6,601 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/layout.tsx | import { Outlet } from '@modern-js/runtime/router';
import { Box } from '@radix-ui/themes';
export default function Layout() {
return (
<Box px="4">
<Outlet />
</Box>
);
}
| 6,602 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/page.loader.ts | import { LoaderFunctionArgs, redirect } from '@modern-js/runtime/router';
import { resolveURL } from 'ufo';
export default ({ request }: LoaderFunctionArgs) => {
const target = resolveURL(request.url, './builder');
return redirect(target);
};
| 6,603 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/page.tsx | export default null;
| 6,604 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/builder/page.tsx | import React from 'react';
import { useSnapshot } from 'valtio';
import { useStore } from '@/client/stores';
import { ObjectInspector } from '@/client/components/ObjectInspector';
const Page: React.FC = () => {
const $store = useStore();
const store = useSnapshot($store);
return <ObjectInspector data={store.buil... | 6,605 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/context/framework/page.tsx | import React from 'react';
import { useSnapshot } from 'valtio';
import { useStore } from '@/client/stores';
import { ObjectInspector } from '@/client/components/ObjectInspector';
const Page: React.FC = () => {
const $store = useStore();
const store = useSnapshot($store);
return (
<ObjectInspector data={stor... | 6,606 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/overview/heading.svg | <svg width="455.127" height="76.954" viewBox="0 0 455.127 76.954" xmlns="http://www.w3.org/2000/svg">
<g id="svgGroup" stroke-linecap="round" fill="white" fill-rule="evenodd" font-size="9pt">
<path d="M 23.096 75.977 L 0 75.977 L 0 4.59 L 24.707 4.59 A 55.919 55.919 0 0 1 33.49 5.243 Q 38.313 6.01 42.334 7.681 A ... | 6,607 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/overview/layout.config.tsx | export const handle = {
breadcrumb: {
title: 'Overview',
},
};
| 6,608 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/overview/page.module.scss | .container {
max-width: 40rem;
}
.bottom-tip {
opacity: 0.3;
transition: opacity 300ms;
&:hover {
opacity: 1;
}
}
.indicate-card {
border-radius: var(--radius-6);
box-shadow: var(--shadow-4);
padding: var(--space-5);
:global(.dark) & {
background-color: var(--gray-1);
}
}
.primary-card {
... | 6,609 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/overview/page.tsx | import { Box, Flex, Kbd, Link, Text, Theme } from '@radix-ui/themes';
import type { BoxProps } from '@radix-ui/themes/dist/cjs/components/box';
import { clsx } from 'clsx';
import React from 'react';
import {
HiOutlineDocumentText,
HiLink,
HiOutlineClock,
HiOutlinePuzzlePiece,
} from 'react-icons/hi2';
import {... | 6,610 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/pages/layout.config.ts | export const handle = {
breadcrumb: {
title: 'Pages',
},
};
| 6,611 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/pages/layout.module.scss | .container {
max-width: 40rem;
} | 6,612 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/pages/layout.tsx | import { Outlet } from '@modern-js/runtime/router';
import { Box } from '@radix-ui/themes';
import styles from './layout.module.scss';
export default function Layout() {
return (
<Box px="4" mx="auto" pb="4" className={styles.container}>
<Outlet />
</Box>
);
}
| 6,613 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/pages/page.module.scss | .input {
position: fixed;
padding-top: var(--breadcrumb-height);
padding-bottom: 10px;
top: 0;
left: var(--navigator-width);
right: 0;
background-image: linear-gradient(to bottom, var(--gray-2), 95%, transparent);
}
| 6,614 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/routes/pages/page.tsx | import { Box, Flex, TextField } from '@radix-ui/themes';
import React, { useState } from 'react';
import { useSnapshot } from 'valtio';
import { parseURL, withTrailingSlash } from 'ufo';
import { HiOutlineArrowsRightLeft } from 'react-icons/hi2';
import styles from './page.module.scss';
import { useStore } from '@/clie... | 6,615 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/rpc/index.ts | import {
ClientFunctions,
ROUTE_BASENAME,
ServerFunctions,
} from '@modern-js/devtools-kit';
import { createBirpc } from 'birpc';
import { parseURL, stringifyParsedURL } from 'ufo';
import { StoreContextValue } from '@/client/types';
export interface SetupOptions {
url: string;
$store: StoreContextValue;
}
... | 6,616 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/stores/index.tsx | import _ from 'lodash';
import { FC, ReactElement, createContext, useContext, useMemo } from 'react';
import { useAsync } from 'react-use';
import createDeferPromise from 'p-defer';
import { getQuery } from 'ufo';
import {
AppContext,
BuilderContext,
TransformedFrameworkConfig,
FrameworkConfig,
BuilderConfig,... | 6,617 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/styles/breakpoints.scss | @custom-media --xs (min-width: 520px);
@custom-media --sm (min-width: 768px);
@custom-media --md (min-width: 1024px);
@custom-media --lg (min-width: 1280px);
@custom-media --xl (min-width: 1640px);
| 6,618 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/styles/theme.scss | @import '@radix-ui/themes/styles.css';
@import './breakpoints.scss';
button {
cursor: pointer;
}
| 6,619 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/types/index.ts | import type {
AppContext,
AssetDefinition,
BuilderConfig,
BuilderContext,
BundlerConfig,
CustomTabView,
FileSystemRoutes,
NameDefinition,
NormalizedBuilderConfig,
PackageDefinition,
TransformedFrameworkConfig,
} from '@modern-js/devtools-kit';
import { FrameworkConfig } from '@modern-js/devtools-k... | 6,620 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/utils/context.tsx | import { createContext, FC, useContext, useMemo } from 'react';
import { proxy } from 'valtio';
import { Promisable } from 'type-fest';
export function createStoreContext<T extends object>(
initializer: () => Promisable<T>,
) {
const InnerContext = createContext<unknown>(null);
const Provider: FC<{ children: Rea... | 6,621 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/utils/hooks.ts | import _ from 'lodash';
import React, { useMemo } from 'react';
import { proxy, useSnapshot } from 'valtio';
export const useProxyFrom = <T extends object>(initializer: () => T) => {
return useMemo(() => proxy(initializer()), []);
};
export const useStoreMap = <T extends object, P extends keyof T>(
arr: T[],
ke... | 6,622 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/client/utils/index.ts | export * from './context';
| 6,623 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/index.tsx | import { createRoot } from 'react-dom/client';
import { parseQuery } from 'ufo';
import _ from 'lodash';
import { SetupClientParams } from '@modern-js/devtools-kit';
import DevtoolsAction from './components/Devtools/Action';
// @ts-expect-error
const { container, resourceQuery } = window._modern_js_devtools_app;
const... | 6,624 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/LoadingIcon.tsx | import React from 'react';
export const LoaderIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
strokeWidth="2"
fill="none"
strokeLinecap="round"
strokeLinejoin="round"
{...props}
>
<... | 6,625 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Portal.tsx | import React from 'react';
import { createPortal } from 'react-dom';
import Visible from './Visible';
export interface PortalProps {
children: React.ReactNode;
show?: boolean;
keepAlive?: boolean;
onClose?: () => void;
root?: Element | DocumentFragment;
}
const Portal: React.FC<PortalProps> = props => {
c... | 6,626 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Visible.tsx | import React, { useRef } from 'react';
export interface VisibleProps {
children: React.ReactNode;
when?: boolean;
keepAlive?: boolean;
}
const Visible: React.FC<VisibleProps> = props => {
const keepAlive = props.keepAlive ?? true;
const { when } = props;
const opened = useRef(false);
if (when) {
op... | 6,627 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/Action.module.scss | .container {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
& > :global(*) {
pointer-events: auto;
}
}
.fab {
position: fixed;
bottom: 10px;
right: 10px;
width: max-content;
height: max-conten... | 6,628 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/Action.tsx | import { SetupClientParams } from '@modern-js/devtools-kit';
import { Flex, Theme } from '@radix-ui/themes';
import React, { useState } from 'react';
import { useEvent, useToggle } from 'react-use';
import { withQuery } from 'ufo';
import Visible from '../Visible';
import styles from './Action.module.scss';
import { Fr... | 6,629 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/FrameBox.module.scss | .container {
overflow: hidden;
box-shadow: var(--shadow-5);
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
@media (min-width: 520px) {
position: relative;
height: 35rem;
width: 50rem;
border-radius: 0.75rem;
}
}
.close-button {
position: absolute;
right: 10px;
top: 10px;... | 6,630 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/FrameBox.tsx | import React, { useState } from 'react';
import { Box } from '@radix-ui/themes';
import type { BoxProps } from '@radix-ui/themes/dist/cjs/components/box';
import { LoaderIcon } from '../LoadingIcon';
import styles from './FrameBox.module.scss';
import { ReactComponent as XMarkIcon } from './xmark.svg';
export interfac... | 6,631 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/heading.svg | <svg width="455.127" height="76.954" viewBox="0 0 455.127 76.954" xmlns="http://www.w3.org/2000/svg">
<g id="svgGroup" stroke-linecap="round" fill="currentColor" fill-rule="evenodd" font-size="9pt">
<path d="M 23.096 75.977 L 0 75.977 L 0 4.59 L 24.707 4.59 A 55.919 55.919 0 0 1 33.49 5.243 Q 38.313 6.01 42.334 7... | 6,632 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/components/Devtools/xmark.svg | <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 20 20" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" data-darkreader-inline-fill="" data-darkreader-inline-stroke="" style="--darkreader-inline-fill: currentColor; --darkreader-inline-stroke: currentColor;">
... | 6,633 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount | petrpan-code/web-infra-dev/modern.js/packages/devtools/client/src/mount/utils/draggable.ts | import React, { useState } from 'react';
import { useEvent } from 'react-use';
export interface StickyDraggableOptions {
margin?: string | number;
clamp?: boolean;
}
const isCrossMargin = (a: string, b: string) =>
({
top: ['left', 'right'],
bottom: ['left', 'right'],
left: ['top', 'bottom'],
rig... | 6,634 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/.eslintrc.js | /** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['@modern-js'],
parserOptions: {
// the base path used to search for `tsconfig.json`
tsconfigRootDir: __dirname,
// the relative path to sub-package's `tsconfig.json`
project: [
require.resolve('./tsconfig.... | 6,635 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/.npmignore | .DS_Store
.pnp
.pnp.js
.env.local
.env.*.local
.history
.rts*
*.log*
*.pid
*.pid.*
*.report
*.lcov
lib-cov
node_modules/
.npm
.lock-wscript
.yarn-integrity
.node_repl_history
.nyc_output
*.tsbuildinfo
.eslintcache
.sonarlint
coverage/
release/
output/
output_resource/
tests/
.vscode/**/*
!.vscode/settings.json
!.vs... | 6,636 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/LICENSE | MIT License
Copyright (c) 2021 Modern.js
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... | 6,637 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/README.md | <p align="center">
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
</p>
<h1 align="center">Modern.js</h1>
<p align="center">
A Progressive React Framework for modern web development.... | 6,638 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/modern.config.js | /** @type {import('@modern-js/module-tools').ModuleConfigParams} */
module.exports = {
buildConfig: {
buildType: 'bundleless',
format: 'cjs',
target: 'es2019',
outDir: './dist',
externalHelpers: true,
dts: process.env.SKIP_DTS !== 'true' ? {} : false,
},
};
| 6,639 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/package.json | {
"name": "@modern-js/devtools-kit",
"description": "A Progressive React Framework for modern web development.",
"homepage": "https://modernjs.dev",
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
"repository": {
"type": "git",
"url": "https://github.com/web-infra-dev/modern.js",
"dir... | 6,640 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/tsconfig.json | {
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@modern-js/tsconfig/base",
"compilerOptions": {
"target": "ES2019",
"declaration": true,
"outDir": "./dist",
"jsx": "preserve",
"baseUrl": "./",
"isolatedModules": true,
"paths": {},
"skipLibCheck": true
},
"incl... | 6,641 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/client.ts | /* eslint-disable max-classes-per-file */
import { Entrypoint } from '@modern-js/types/cli';
import logo from './logo';
import { FileSystemRoutes } from './server';
export interface ClientFunctions {
refresh: () => void;
updateFileSystemRoutes: (param: {
entrypoint: Entrypoint;
routes: FileSystemRoutes;
... | 6,642 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/constants.ts | export const ROUTE_BASENAME = '/__devtools';
| 6,643 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/index.ts | export * from './server';
export * from './client';
export * from './mount-point';
export * from './utils';
export * from './constants';
| 6,644 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/logo.ts | const encoded = `PHN2ZyB3aWR0aD0iMzMiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCA0NSAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzEzOjUxNDkpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTguODIwNzcgMjAuMjg2OUM3Ljg0NzU5IDE3LjE1NzEgNy45NjgyNiAxMy43ODk... | 6,645 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/mount-point.ts | import type { ClientDefinition } from './client';
export interface MountPointFunctions {
getLocation: () => string;
}
export interface SetupClientParams {
endpoint: string;
dataSource: string;
def: ClientDefinition;
}
| 6,646 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/server.ts | import type { AppTools, IAppContext, UserConfig } from '@modern-js/app-tools';
import type { BuilderContext } from '@modern-js/builder-shared';
import type {
BuilderConfig as WebpackBuilderConfig,
NormalizedConfig as NormalizedWebpackBuilderConfig,
WebpackConfig,
webpack,
} from '@modern-js/builder-webpack-prov... | 6,647 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit | petrpan-code/web-infra-dev/modern.js/packages/devtools/kit/src/utils.ts | import { ShortenAlias } from './client';
export function applyShortenAliases(
resource: string,
aliases?: ShortenAlias[],
) {
if (!aliases) return resource;
let ret = resource;
for (const alias of aliases) {
ret = ret.replace(alias.replace, alias.to);
}
return ret;
}
| 6,648 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/.eslintrc.js | /** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['@modern-js'],
parserOptions: {
// the base path used to search for `tsconfig.json`
tsconfigRootDir: __dirname,
// the relative path to sub-package's `tsconfig.json`
project: [
require.resolve('./tsconfig.... | 6,649 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/.npmignore | .DS_Store
.pnp
.pnp.js
.env.local
.env.*.local
*.log*
node_modules/
*.tsbuildinfo
.eslintcache
coverage/
output/
output_resource/
tests/
.vscode/**/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/
src/
modern.config.*
jest.config.js
.eslintrc.js
.eslintrc
tsconfig.json
CHANGELOG.md
| 6,650 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/CHANGELOG.md | # @modern-js/plugin-devtools
## 2.41.0
### Patch Changes
- c4d396a: chore(swc): bump swc and helpers
chore(swc): 升级 swc 以及 helpers
- Updated dependencies [c4d396a]
- Updated dependencies [7640d4d]
- @modern-js/runtime@2.41.0
- @modern-js/utils@2.41.0
- @modern-js/devtools-kit@2.41.0
- @modern-js/devtools-c... | 6,651 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/LICENSE | MIT License
Copyright (c) 2021-present Modern.js
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | 6,652 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/README.md | <p align="center">
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
</p>
<h1 align="center">Modern.js</h1>
<p align="center">
A Progressive React Framework for modern web development.... | 6,653 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/modern.config.js | const { tscLikeBuildConfig } = require('@scripts/build');
/** @type {import('@modern-js/module-tools').ModuleConfigParams} */
module.exports = {
buildConfig: tscLikeBuildConfig,
};
| 6,654 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/package.json | {
"name": "@modern-js/plugin-devtools",
"description": "A Progressive React Framework for modern web development.",
"homepage": "https://modernjs.dev",
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
"repository": {
"type": "git",
"url": "https://github.com/web-infra-dev/modern.js",
"... | 6,655 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/tsconfig.json | {
"extends": "@modern-js/tsconfig/base",
"compilerOptions": {
"target": "ES2019",
"declaration": true,
"outDir": "./dist",
"jsx": "preserve",
"baseUrl": "./",
"isolatedModules": true,
"paths": {}
},
"include": ["src"]
}
| 6,656 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/cli.ts | import http from 'http';
import path from 'path';
import { ProxyDetail } from '@modern-js/types';
import { getPort, logger } from '@modern-js/utils';
import createServeMiddleware from 'serve-static';
import type { AppTools, CliPlugin } from '@modern-js/app-tools';
import { ROUTE_BASENAME } from '@modern-js/devtools-kit... | 6,657 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/config.ts | import {
ClientDefinition,
ROUTE_BASENAME,
SetupClientParams,
} from '@modern-js/devtools-kit';
import type { RequiredDeep } from 'type-fest';
export type DevtoolsPluginOptions = Partial<SetupClientParams>;
export interface DevtoolsPluginInlineOptions extends DevtoolsPluginOptions {
enable?: boolean;
}
expor... | 6,658 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/index.ts | export { devtoolsPlugin, default } from './cli';
export type { DevtoolsPluginOptions, DevtoolsPluginInlineOptions } from './cli';
| 6,659 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/modern-app-env.d.ts | /// <reference types='@modern-js/types/hoist-non-react-statics' />
declare let __resourceQuery: string;
| 6,660 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/types.ts | /* eslint-disable node/no-unsupported-features/es-builtins */
import type { Buffer } from 'buffer';
import { BaseHooks } from '@modern-js/core';
import type { BuilderPluginAPI as WebpackBuilderAPI } from '@modern-js/builder-webpack-provider';
import type { BuilderPluginAPI as RspackBuilderAPI } from '@modern-js/builder... | 6,661 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/rpc/index.ts | import _ from '@modern-js/utils/lodash';
import {
ClientDefinition,
type BuilderConfig,
type BundlerConfig,
type ClientFunctions,
type FileSystemRoutes,
type NormalizedBuilderConfig,
type ServerFunctions,
} from '@modern-js/devtools-kit';
import type { JsonValue, PartialDeep } from 'type-fest';
import { c... | 6,662 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/utils/module.ts | import assert from 'assert';
import module from 'module';
import path from 'path';
export const getRequire = (): NodeRequire => {
try {
return require;
} catch {}
const issuer = new Error().stack
?.split('\n')[2]
.match(/\s*at .+? \((.*)\)$/)?.[1];
if (issuer && path.isAbsolute(issuer)) {
// e... | 6,663 |
0 | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src | petrpan-code/web-infra-dev/modern.js/packages/devtools/plugin/src/utils/socket.ts | import { IncomingMessage } from 'http';
import WebSocket from 'ws';
import { BufferLike } from '../types';
export interface SendMessageOptions {
mask?: boolean | undefined;
binary?: boolean | undefined;
compress?: boolean | undefined;
fin?: boolean | undefined;
}
export type ServerOptions<
U extends typeof ... | 6,664 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/.eslintrc.js | module.exports = {
root: true,
extends: ['@modern-js'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
ignorePatterns: ['rspress.config.ts'],
rules: {
'babel/no-unused-expressions': 0,
'react/jsx-filename-extension': 0,
},
};
| 6,665 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/.npmignore | .DS_Store
.pnp
.pnp.js
.env.local
.env.*.local
*.log*
node_modules/
*.tsbuildinfo
.eslintcache
coverage/
tests/
.vscode/**/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/
jest.config.js
.eslintrc.js
.eslintrc
tsconfig.json
CHANGELOG.md
.nx-cache/
scripts/
doc_build
| 6,666 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/CHANGELOG.md | # @modern-js/builder-doc
## 2.41.0
### Patch Changes
- 3164aad: chore(storybook): enhance docs and auto detect builder provider
chore(storybook): 改进文档,自动判断的 builder provider
## 2.40.0
### Patch Changes
- 477f18d: doc(builder-doc): add version tip for sourceBuild api
doc(builder-doc): 为 sourceBuild API 添加版本提示... | 6,667 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/LICENSE | MIT License
Copyright (c) 2021-present Modern.js
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | 6,668 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/README.md | <p align="center">
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
</p>
<p align="center">
Modern.js Builder
<br/>
<a href="https://modernjs.dev/builder/en" target="blank">
mod... | 6,669 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/package.json | {
"name": "@modern-js/builder-doc",
"version": "2.41.0",
"description": "Shared documentation of modern.js builder",
"homepage": "https://modernjs.dev",
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
"repository": {
"type": "git",
"url": "https://github.com/web-infra-dev/modern.js",
... | 6,670 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/rspress.config.ts | import path from 'path';
import { Sidebar, NavItem } from '@rspress/shared';
import { defineConfig } from 'rspress/config';
function getI18nHelper(lang: 'zh' | 'en') {
const cn = lang === 'zh';
const prefix = cn ? '' : '/en';
const getLink = (str: string) => `${prefix}${str}`;
const getText = (cnText: string, ... | 6,671 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/tsconfig.json | {
"extends": "@modern-js/tsconfig/base",
"compilerOptions": {
"jsx": "preserve"
},
"include": ["docs", "rspress.config.ts", "src"]
}
| 6,672 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/index.md | ---
pageType: home
hero:
name: Modern.js Builder
tagline: A Build Engine for web development.
actions:
- theme: brand
text: Introduction
link: /en/guide/introduction.html
- theme: alt
text: Quick Start
link: /en/guide/quick-start.html
features:
- title: Rust Bundler
details... | 6,673 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/builder-core.mdx | ---
extractApiHeaders: [2]
---
# Builder Core
This section describes some of the core methods provided by Builder.
## createBuilder
Create a Builder instance object.
When using this method, it needs to be used with the `@modern-js/builder-webpack-provider` or `@modern-js/builder-rspack-provider`. Providers impleme... | 6,674 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/builder-instance.mdx | ---
extractApiHeaders: [2]
---
# Builder Instance
This section describes all the properties and methods on the Builder instance object.
## builder.context
`builder.context` is a read-only object that provides some context infos.
### builder.context.entry
The entry object, corresponding to the `entry` option of `c... | 6,675 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/builder-types.mdx | ---
extractApiHeaders: [2]
---
# Builder Types
This section describes some of the type definitions provided by the Builder.
## BuilderInstance
The type of the Builder instance.
```ts
import type { BuilderInstance } from '@modern-js/builder';
let builder: BuilderInstance;
```
You can pass in the Provider type thr... | 6,676 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-dev.mdx | ---
extractApiHeaders: [2]
---
# Dev Config
This section describes some dev configurations in Modern.js Builder.
## dev.assetPrefix
import AssetPrefix from '@en/config/dev/assetPrefix.md';
<AssetPrefix />
## dev.beforeStartUrl
import BeforeStartUrl from '@en/config/dev/beforeStartUrl.md';
<BeforeStartUrl />
##... | 6,677 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-experiments.mdx | ---
extractApiHeaders: [2]
---
# Experiments Config
This section describes some experimental configs in the Builder, which can enable unstable features in Builder.
If you meet issues with experimental features, please disable the config first and report through [GitHub Issues](https://github.com/web-infra-dev/modern... | 6,678 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-html.mdx | ---
extractApiHeaders: [2]
---
# Html Config
This section describes some HTML configurations in Modern.js Builder.
## html.appIcon
import AppIcon from '@en/config/html/appIcon.md';
<AppIcon />
## html.crossorigin
import Crossorigin from '@en/config/html/crossorigin.md';
<Crossorigin />
## html.disableHtmlFolde... | 6,679 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-output.mdx | ---
extractApiHeaders: [2]
---
# Output Config
This section describes some output related configurations in Modern.js Builder.
## output.assetPrefix
import AssetPrefix from '@en/config/output/assetPrefix.md';
<AssetPrefix />
## output.assetsRetry
import AssetsRetry from '@en/config/output/assetsRetry.md';
<Asse... | 6,680 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-performance.mdx | ---
extractApiHeaders: [2]
---
# Performance Config
This section describes some performance related configurations in Modern.js Builder.
## performance.buildCache
import BuildCache from '@en/config/performance/buildCache.md';
<BuildCache />
## performance.bundleAnalyze
import BundleAnalyze from '@en/config/perfo... | 6,681 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-security.mdx | ---
extractApiHeaders: [2]
---
# Security Config
This section describes some security related configurations in Modern.js Builder.
## security.sri
import Sri from '@en/config/security/sri.md';
<Sri />
## security.checkSyntax
import CheckSyntax from '@en/config/security/checkSyntax.md';
<CheckSyntax />
| 6,682 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-source.mdx | ---
extractApiHeaders: [2]
---
# Source Config
This section describes configs related to source code parsing and compilation in Modern.js Builder.
## source.alias
import Alias from '@en/config/source/alias.md';
<Alias />
## source.aliasStrategy
import AliasStrategy from '@en/config/source/aliasStrategy.md';
<Al... | 6,683 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/config-tools.mdx | ---
extractApiHeaders: [2]
---
# Tools Config
This section describes some low-level tools configurations in Modern.js Builder.
## tools.autoprefixer
import Autoprefixer from '@en/config/tools/autoprefixer.md';
<Autoprefixer />
## tools.babel
import Babel from '@en/config/tools/babel.md';
<Babel />
## tools.bun... | 6,684 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/index.mdx | ---
overview: true
---
# API
| 6,685 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/plugin-core.mdx | ---
extractApiHeaders: [2]
---
# Plugin Core
This section describes the core plugin types and APIs.
## BuilderPlugin
The type of the plugin object. The plugin object contains the following properties:
- `name`: The name of the plugin, a unique identifier.
- `setup`: The setup function of the plugin, which can be a... | 6,686 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/api/plugin-hooks.mdx | ---
extractApiHeaders: [2]
---
# Plugin Hooks
This section describes the lifetime hooks provided by Builder plugin.
## Overview
**Common Hooks**
- `modifyBuilderConfig`: Modify raw config of Builder.
- `modifyBundlerChain` (experimental): Modify config of webpack or Rspack via the bundler chain api.
- `modifyWebpa... | 6,687 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/assetPrefix.md | - **Type:** `boolean | string`
- **Default:** `'/'`
Set the URL prefix of static assets in the development environment.
`assetPrefix` will affect the URLs of most of the static assets, including JavaScript files, CSS files, images, videos, etc. If an incorrect value is specified, you'll receive 404 errors while loadi... | 6,688 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/beforeStartUrl.md | - **Type:** `() => Promise<void> | void`
- **Default:** `undefined`
`dev.beforeStartUrl` is used to execute a callback function before opening the `startUrl`, this config needs to be used together with `dev.startUrl`.
```js
export default {
dev: {
startUrl: true,
beforeStartUrl: async () => {
await do... | 6,689 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/hmr.md | - **Type:** `boolean`
- **Default:** `true`
Whether to enable Hot Module Replacement.
If `hmr` is set to `false`, the HMR and react-refresh will no longer work.
```js
export default {
dev: {
hmr: false,
},
};
```
| 6,690 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/host.md | - **Type:** `string`
- **Default:** `0.0.0.0`
Specify the host that the dev server listens to.
By default, the dev server will listen to `0.0.0.0`, which means listening to all network interfaces, including `localhost` and public network addresses.
If you want the dev server to listen only on `localhost`, you can se... | 6,691 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/https.md | - **Type:** `boolean | { key: string; cert: string }`
- **Default:** `false`
After configuring this option, you can enable HTTPS Dev Server, and disabling the HTTP Dev Server.
HTTP:
```bash
> Local: http://localhost:8080/
> Network: http://192.168.0.1:8080/
```
HTTPS:
```bash
> Local: https://localhost:8080/... | 6,692 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/port.md | - **Type:** `number`
- **Default:** `8080`
Specify a port number for Dev Server to listen.
By default, Dev Server listens on port `8080` and automatically increments the port number when the port is occupied.
### Example
Set the port to `3000`:
```ts
export default {
dev: {
port: 3000,
},
};
```
| 6,693 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/progressBar.md | - **Type:**
```ts
type ProgressBar =
| boolean
| {
id?: string;
};
```
- **Default:** `true`
Whether to display progress bar during compilation.
```js
export default {
dev: {
progressBar: false,
},
};
```
If you need to modify the text displayed on the left side of the progress bar, you can s... | 6,694 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/dev/startUrl.md | - **Type:** `boolean | string | string[] | undefined`
- **Default:** `undefined`
`dev.startUrl` is used to set the URL of the page that automatically opens in the browser when Dev Server starts.
By default, no page will be opened.
You can set it to the following values:
```js
export default {
dev: {
// Open t... | 6,695 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/experiments/lazyCompilation.md | - **Type:**
```ts
type LazyCompilationOptions =
| boolean
| {
// Whether to enable lazy compilation for entries
entries?: boolean;
// Whether to enable lazy compilation for dynamic imports
imports?: boolean;
};
```
- **Default:** `false`
- **Bundler:** `only support webpack`
Used to e... | 6,696 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/experiments/sourceBuild.md | - **Type:** `boolean`
- **Default:** `false`
- **Bundler:** `only support webpack`
- **Version:** `MAJOR_VERSION.26.0`
Used to enable the ability for source code building. When this configuration option is enabled, Builder will read the source code files corresponding to the `source` field in the sub-project's package... | 6,697 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/html/appIcon.md | - **Type:** `string`
- **Default:** `undefined`
Set the file path of the apple-touch-icon icon for the iOS system, can be set as a relative path relative to the project root directory, or as an absolute path to the file. Setting it as a CDN URL is not currently supported.
After config this option, the icon will be au... | 6,698 |
0 | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config | petrpan-code/web-infra-dev/modern.js/packages/document/builder-doc/docs/en/config/html/crossorigin.md | - **Type:** `boolean | 'anonymous' | 'use-credentials'`
- **Default:** `false`
Set the [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) attribute of the `<script>` and `<style>` tags.
- If `true` is passed, it will automatically be set to `crossorigin="anonymous"`.
- If `false` ... | 6,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.