Code Monkey home page Code Monkey logo

vite-plugin-chunk-split's Introduction

vite-plugin-chunk-split

English | 中文

A vite plugin for better chunk splitting.

Usage

// use npm
npm i vite-plugin-chunk-split -D
// use yarn
yarn add vite-plugin-chunk-split -D
// use pnpm
pnpm i vite-plugin-chunk-split -D

Then you can use it in vite.config.ts:

// vite.config.ts
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';

{
  plugins: [
    // ...
    chunkSplitPlugin()
  ]
}

Options

type packageInfo = string | RegExp;
type Strategy =
  // split by default
  | 'default'
  // all files will be together
  | 'all-in-one'
  // unbundle for your source files,vite will generate one chunk for every file
  | 'unbundle';

export type CustomSplitting = Record<string, packageInfo[]>;

export interface ChunkSplitOptions {
  strategy?: Strategy;
  customSplitting?: CustomSplitting;
}

You can use the options to customize your splitting strategy, for example:

// vite.config.ts
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';

{
  plugins: [
    // ...
    chunkSplitPlugin({
      strategy: 'single-vendor',
      customChunk: (args)=>{
        // files into pages directory is export in single files
        let { file, id, moduleId, root } = args;
        if(file.startsWith('src/pages/')){
          file = file.substring(4);
          file = file.replace(/\.[^.$]+$/, '');
          return file;
        }
        return null;
      }
      customSplitting: {
        // `react` and `react-dom` will be bundled together in the `react-vendor` chunk (with their dependencies, such as object-assign)
        'react-vendor': ['react', 'react-dom'],
        // Any file that includes `utils` in src dir will be bundled in the `utils` chunk
        'utils': [/src\/utils/]
      }
    })
  ]
}

By the way, you can achieve bundleless by the unbundle strategy:

// vite.config.ts
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';

{
  plugins: [
    // ...
    chunkSplitPlugin({
      strategy: 'unbundle',
      customSplitting: {
        // All files in `src/container` will be merged together in `container` chunk
        'container': [/src\/container/]
      }
    })
  ]
}

License

MIT

vite-plugin-chunk-split's People

Contributors

ermuz avatar greenhat616 avatar sanyuan0704 avatar spike-leung avatar yracnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vite-plugin-chunk-split's Issues

Cannot read properties of undefined (reading 'exports')

If I try to use this plugin to split chunks, I get error in runtime, when start preview of build. There is something wrong in custom spliting (customSplitting).

Uncaught TypeError: Cannot read properties of undefined (reading 'exports')

image

chunkSplitPlugin({
      strategy: "single-vendor",
      customSplitting: {
        common: [/src\/ts\/utils/, /src\/ts\/components/],
        "react-common": [
          /src\/ts\/react-components/,
          /src\/ts\/react-hooks/,
          /src\/ts\/react-theme/,
          /src\/ts\/react-utils/,
        ],
      },
    })

unbundle + import from parent folder: Invalid substitution "../x" for placeholder "[name]" in "output.chunkFileNames" pattern, can be neither absolute nor relative path

"import from parent folder" is a common pattern in the demo/ folder of a project

probably this is a "wontfix" because all solutions can be wrong (filepath collisions)

index.js

import { f } from "../index.js"

error

Invalid substitution "../index" for placeholder "[name]" in "output.chunkFileNames" pattern, can be neither absolute nor relative path.

repro https://github.com/milahu/vite-plugin-chunk-split-repro

cd $(mktemp -d)
git clone https://github.com/milahu/vite-plugin-chunk-split-repro
cd *
npm install
npm run build

vite.config.js

import { defineConfig } from "vite"
import path from 'path'
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'

const assetsDir = '';
const outputDefaults = {
  // remove hashes from filenames
  entryFileNames: `${assetsDir}[name].js`,
  // Invalid substitution "../index" for placeholder "[name]" in "output.chunkFileNames" pattern, can be neither absolute nor relative path.
  chunkFileNames: `${assetsDir}[name].js`,
  assetFileNames: `${assetsDir}[name].[ext]`,
}

export default defineConfig({
  base: "./",
  clearScreen: false,
  build: {
    outDir: path.resolve('../docs'),
    emptyOutDir: true,
    target: 'esnext',
    minify: false,
    rollupOptions: {
      output: {
        ...outputDefaults,
      }
    },
  },
  plugins: [
    chunkSplitPlugin({
      strategy: 'unbundle',
    })
  ],
})

workarounds

const assetsDir = '';
const outputDefaults = {
  // remove hashes from filenames
  entryFileNames: `${assetsDir}[name].js`,

  // import from parent folder
  // https://github.com/sanyuan0704/vite-plugin-chunk-split/issues/16
  // Invalid substitution "../index" for placeholder "[name]" in "output.chunkFileNames" pattern, can be neither absolute nor relative path.
  //chunkFileNames: `${assetsDir}[name].js`,
  // workarounds ...
  chunkFileNames: (file) => {
    //console.dir(file.name); throw new Error("x");
    // Invalid pattern ".._index.js" for "output.chunkFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.
    //return file.name.replace(/\//g, "_") + ".js" // docs/.._index.js
    //return file.name.replace(/\//g, "_").replace(/^\./, "+") + ".js" // docs/+._index.js
    //return file.name.replace(/\.\.\//g, "_") + ".js" // docs/_index.js
    return file.name.replace(/\.\.\//g, ".parent/") + ".js" // docs/.parent/index.js
  },

  assetFileNames: `${assetsDir}[name].[ext]`,
}

打出来的vendor包会把当前模块没有引入的node_modules下的项目也打进去

当前项目是一个多入口的项目

     rollupOptions: {
        input: {
          main: resolve(__dirname, 'src/index.html'),
          fastUpload: resolve(__dirname, 'src/fastUpload/index.html'),
          dataReport: resolve(__dirname, 'src/dataReport/index.html'),
          download: resolve(__dirname, 'src/download/index.html'),
        },
      },

采用的配置

      chunkSplitPlugin({
        strategy: 'default',
        customSplitting: {
          // `react` and `react-dom` 会被打包到一个名为`render-vendor`的 chunk 里面(包括它们的一些依赖,如 object-assign)
          'react-vendor': ['react', 'react-dom'],
          'lodash-vendor': ['lodash'],
        }
      })

其中node_modules里的 echarts只被dataReport模块依赖,但是也会被打进vendor包里,在index页面加载时也会被加载进去。
image

如果只用rullupOptions配置是可以做到echarts只被dataReport模块引入的,但是会没有了vendor包

        output: {
          // manualChunks 配置
          manualChunks: {
            'react-vendor': ['react', 'react-dom'],
            'lodash-vendor': ['lodash'],
          },
        },

image

期待的效果是vendor包中只存在当前模块有依赖的项目。

Invalid build output for `strategy: 'unbundle'`

On "vite": "^2.9.7" and with unbundle strategy the build will not run in preview mode (with npm run preview)
Instead it generates a whole bunch of 404 not found errors. I assume it is because of the wrong path in index.html

image

example of index.html script paths (unbundle strategy)

<script type="module" crossorigin src="/assets/vite\\modulepreload-polyfill.75a5f89c.js"></script>
<script type="module" crossorigin src="/assets/react\\jsx-runtime.7eec44ec.js"></script>
<script type="module" crossorigin src="/assets/_commonjsHelpers.0592d25c.js"></script>
<script type="module" crossorigin src="/assets/_react\\jsx-runtime_commonjs-proxy.b6872daf.js"></script>
<script type="module" crossorigin src="/assets/vendor.4581de72.js"></script>
<script type="module" crossorigin src="/assets/src\\config\\brand-config.3bbd6094.js"></script>
<script type="module" crossorigin src="/assets/src\\utils\\generate-utility-classnames.56b99e79.js"></script>
<script type="module" crossorigin src="/assets/src\\pages\\welcome\\components\\constants.d4fff9c7.js"></script>
<script type="module" crossorigin src="/assets/src\\utils\\styles.cb43d375.js"></script>
<script type="module" crossorigin src="/assets/src\\themes\\dark.45618e04.js"></script>
<script type="module" crossorigin src="/assets/src\\themes\\light.d28e6639.js"></script>

example from index.html script path (no strategy)

<script type="module" crossorigin src="/assets/index.6cbdf144.js"></script>
<link rel="modulepreload" href="/assets/vendor.cac78811.js">
<link rel="stylesheet" href="/assets/index.173328f5.css">

monorepo: Cannot find package

I have both react and react-dom installed and running the example, it gives an error saying the packages cannot be found

image

Chunks from `customSplitting` get imported in every entry

I have an MPA, every .html file includes it own script file. Everithing is building correctly except one case, chunks jquery, vendor or common are imported in html and in script file.

File example

console.log("hello");

Build example

import"./chunks/landing.js";
import"./chunks/common.js";
import"./chunks/vendor.js";
import"./chunks/jquery.js";
console.log("hello");

Plugin config

    chunkSplitPlugin({
      strategy: "single-vendor",
      customSplitting: {
        jquery: [/jquery/],
        vendor: [/node_modules/],
        common: [/src\/ts\/utils/, /src\/ts\/components/],
      },
    }),

unbundle: more control over vendor / async-vendor

if (staticImportedScan(id, getModuleInfo, new Map(), [])) {
    return "vendor";
  } else {
    return "async-vendor";
}

Currently, this produces very large vendor / async-vendor (2MB+) bundles for me. This might be better if these could possibly:

  1. Returned undefined for default rollup splitting logic.
  2. Return the name of the npm package, such as lodash or date-fns ( returning undefined might actually do this? )

Of course, people like options, so if there is some way to turn this into a new option on the plugin, that is always ideal so folks can opt-in to the behavior they would like.

explain difference to rollupOptions.output.manualChunks

what is the difference to rollupOptions.output.manualChunks?

vite.config.js manualChunks

import { defineConfig } from "vite"

export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes('/node_modules/@codemirror/')) {
            return 'codemirror';
          }
          console.log("id", id)
          if (id.includes('/node_modules/')) {
            return 'vendor';
          }
        },
      }
    },
  },
})

vite.config.js chunkSplitPlugin

import { defineConfig } from "vite"
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'

export default defineConfig({
  plugins: [
    chunkSplitPlugin({
      //strategy: 'default',
      customSplitting: {
        'codemirror': [/\/node_modules\/@codemirror\//],
      }
    })
  ],
})

result manualChunks

dist/index.js        11.26 KiB / gzip: 4.35 KiB
dist/vendor.js       187.72 KiB / gzip: 40.70 KiB
dist/codemirror.js   369.08 KiB / gzip: 116.12 KiB

result chunkSplitPlugin

dist/index.js                 11.29 KiB / gzip: 4.36 KiB
dist/vendor.js                187.66 KiB / gzip: 40.72 KiB
dist/codemirror.js            369.08 KiB / gzip: 116.12 KiB
dist/__commonjsHelpers__.js   0.13 KiB / gzip: 0.09 KiB

this plugin uses too much memory

when i add this plugin to my project, and run 'npm run build', it used more than 2g of memory and finally threw the error - ‘JavaScript heap out of memory’.

`F:\program\react-backservice-typescript>npm run build

[email protected] build
tsc && vite build

production
vite v5.1.5 building for production...
✓ 6685 modules transformed.

<--- Last few GCs --->

[8768:00000000075FC610] 133378 ms: Mark-sweep (reduce) 1981.9 (2031.5) -> 1981.7 (2031.8) MB, 1930.1 / 0.0 ms (average mu = 0.195, current mu = 0.003) allocation failure; scavenge might not succeed
[8768:00000000075FC610] 135314 ms: Mark-sweep (reduce) 1982.7 (2031.8) -> 1982.6 (2032.8) MB, 1934.8 / 0.0 ms (average mu = 0.102, current mu = 0.001) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00000001402507BF node_api_throw_syntax_error+175823
2: 00000001401D5796 EVP_MD_meth_get_input_blocksize+59654
3: 00000001401D7480 EVP_MD_meth_get_input_blocksize+67056
4: 0000000140C7DCC4 v8::Isolate::ReportExternalAllocationLimitReached+116
5: 0000000140C69052 v8::Isolate::Exit+674
6: 0000000140AEAF0C v8::internal::EmbedderStackStateScope::ExplicitScopeForTesting+124
7: 0000000140AE812B v8::internal::Heap::CollectGarbage+3963
8: 0000000140AFE363 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath+2099
9: 0000000140AFEC0D v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath+93
10: 0000000140B0E3D0 v8::internal::Factory::NewFillerObject+816
11: 00000001407FF315 v8::internal::DateCache::Weekday+1349
12: 0000000140D1B1F1 v8::internal::SetupIsolateDelegate::SetupHeap+558193
13: 0000000140CCCC65 v8::internal::SetupIsolateDelegate::SetupHeap+237285
14: 00000000C11DBB94`

Does nothing on vite 3.0.3

I'm using latest version: 0.2.5. With Vite 2.9 it works seamlessly

import react from '@vitejs/plugin-react'
import { fileURLToPath, URL } from 'url'
import { defineConfig } from 'vite'
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'
import tsconfigPaths from 'vite-tsconfig-paths'

const splitConfig: any = {
  strategy: 'single-vendor',
  customSplitting: {
    'react-vendor': ['react', 'react-dom', 'react-router-dom'],
    'ionic-react-vendor': ['@ionic/react'],
    'ionic-react-router-vendor': ['@ionic/react-router'],
    'side-effects-vendor': [/src\/state/]
  }
}

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react(), tsconfigPaths(), chunkSplitPlugin(splitConfig)],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})

在Vite3中,通过写依赖包名字拆包失效

在升级了vite3后,按照文档的写法

// vite.config.ts
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';

{
  plugins: [
    // ...
    chunkSplitPlugin({
      strategy: 'single-vendor',
      customSplitting: {
        // `react` and `react-dom` will be bundled together in the `react-vendor` chunk (with their dependencies, such as object-assign)
        'react-vendor': ['react', 'react-dom'],
        // Any file that includes `utils` in src dir will be bundled in the `utils` chunk
        'utils': [/src\/utils/]
      }
    })
  ]
}

此时打包,utils文件正常生成,react-vendor这种通过包名的不会生效

相关文件链接:https://codesandbox.io/s/new-breeze-yizrbj?file=/vite.config.js:303-345

Node 20, Vite 5, pnpm 9 报错 `Error: Cannot find package ...`

环境

npm create vue@latest 创建的 Vue 3 项目。环境如下:

  • macOS
  • Node.js 20.12.2
  • Vite 5.2.11
  • pnpm 9.1.0

问题

配置如下:

chunkSplitPlugin({
	strategy: 'default',
	customSplitting: {
		'vendor': ['vue'],
	}
})

运行 vite build 提示以下错误:

error during build:
Error: Cannot find package 'vue' imported from /path/to/my/project
    at __node_internal_ (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/lib/errors.js:436:11)
    at new NodeError (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/lib/errors.js:380:5)
    at packageResolve (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/lib/resolve.js:1035:9)
    at moduleResolve (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/lib/resolve.js:1113:18)
    at defaultResolve (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/lib/resolve.js:1289:15)
    at resolve (file:///path/to/my/project/node_modules/.pnpm/[email protected]/node_modules/import-meta-resolve/index.js:32:12)
    at resolveEntry (file:///path/to/my/project/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected]_/node_modules/vite-plugin-chunk-split/dist/index.mjs:53:10)
    at file:///path/to/my/project/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected]_/node_modules/vite-plugin-chunk-split/dist/index.mjs:67:76
    at Array.map (<anonymous>)
    at wrapCustomSplitConfig (file:///path/to/my/project/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected]_/node_modules/vite-plugin-chunk-split/dist/index.mjs:67:62)

临时解决

把配置修改为:

chunkSplitPlugin({
	strategy: 'default',
	customSplitting: {
		'vendor': [/\/vue\//],
	}
})

可以正常打包。但不确定有什么不良后果。


感谢关注!

在vite 3.2.0如果声明依赖项的拆分,会导致项目无法运行,

// vite.config.ts
...
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'

export default defineConfig({
  plugins: [
    vue(),
    chunkSplitPlugin({
      strategy: 'default',
      customSplitting: {
        element: ['element-plus'],
      },
    }),
  ]
})

如果声明了依赖的拆包,开发环境都无法运行,并报如下错误
error when starting dev server: Error: Failed to resolve entry for package "element-plus". The package may have incorrect main/module/exports specified in its package.json: Cannot read properties of undefined (reading 'length')

设备信息

System:
OS: Windows 10 10.0.22621
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
Memory: 6.02 GB / 15.86 GB
Binaries:
Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.675.0), Chromium (106.0.1370.52)
Internet Explorer: 11.0.22621.1

What is the purpose of `__commonjsHelpers__.js`?

This chunk is generated by default for single-vendor strategy`, is required by every entry and no one entry use it code.

To drop it from bundle I use next override and everything is working fine

      customSplitting: {
        __commonjsHelpers__: [/some unreachable check/], // override
        jquery: [/jquery/],
        vendor: [/node_modules/],
        react: [/react/, /react-dom/],
        common: [/src\/ts\/utils/, /src\/ts\/components/],
      },

[email protected]上报错

error when starting dev server:
TypeError: Cannot destructure property 'dir' of 'object null' as it is null.
    at resolvePackageEntry (file:///D:/git/code/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:28605:36)
    at D:\git\code\node_modules\vite-plugin-chunk-split\dist\utils.js:35:16
    at Generator.next (<anonymous>)
    at fulfilled (D:\git\code\node_modules\vite-plugin-chunk-split\dist\utils.js:5:58)
error Command failed with exit code 1.

Use import instead of require

Show error when I run vite build

Error during build:
Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/import-meta-resolve/index.js from node_modules/vite-plugin-chunk-split/dist/index.cjs not supported.
Instead change the require of index.js in node_modules/vite-plugin-chunk-split/dist/index.cjs to a dynamic import() which is available in all CommonJS modules.

build error

Uncaught TypeError: Cannot set properties of undefined (setting 'exports')
at react-vendor-2dcb6f28.js:1:488
at react-vendor-2dcb6f28.js:1:492

 customSplitting: {
 'react-vendor': ['react', 'react-dom']
}

dependencies are not bundled

how can i bundle all dependencies into one file?
(without using dynamic imports)

example: bundle all dependencies of ...

import { EditorView, Decoration, keymap } from "@codemirror/view"
import { StateField, StateEffect } from "@codemirror/state"
import { StreamLanguage } from "@codemirror/language"
import { defaultKeymap, history, historyKeymap } from "@codemirror/commands"

... into dist/codemirror.js

based on my example in #17

import { defineConfig } from "vite"
import { chunkSplitPlugin } from 'vite-plugin-chunk-split'

export default defineConfig({
  plugins: [
    chunkSplitPlugin({
      //strategy: 'default',
      customSplitting: {
        'codemirror': [/\/node_modules\/@codemirror\//],
      }
    })
  ],
})

problem: dependencies of codemirror are not bundled into codemirror.js

for example, style-mod and @lezer/common are in vendor.js

dist/index.js                 11.29 KiB / gzip: 4.36 KiB
dist/vendor.js                187.66 KiB / gzip: 40.72 KiB
dist/codemirror.js            369.08 KiB / gzip: 116.12 KiB
pnpm list --recursive --depth 10

devDependencies:

@codemirror/commands 6.1.2
├─┬ @codemirror/language 6.3.1
│ ├── @codemirror/state 6.1.4
│ ├─┬ @codemirror/view 6.6.0
│ │ ├── @codemirror/state 6.1.4
│ │ ├── style-mod 4.0.0
│ │ └── w3c-keyname 2.2.6
│ ├── @lezer/common 1.0.2
│ ├─┬ @lezer/highlight 1.1.3
│ │ └── @lezer/common 1.0.2
│ ├─┬ @lezer/lr 1.2.5
│ │ └── @lezer/common 1.0.2
│ └── style-mod 4.0.0
├── @codemirror/state 6.1.4
├─┬ @codemirror/view 6.6.0
│ ├── @codemirror/state 6.1.4
│ ├── style-mod 4.0.0
│ └── w3c-keyname 2.2.6
└── @lezer/common 1.0.2

@codemirror/state 6.1.4

@codemirror/view 6.6.0
├── @codemirror/state 6.1.4
├── style-mod 4.0.0
└── w3c-keyname 2.2.6

queue-microtask 1.2.3

在 vitepress 中报错。

报错代码

building client + server bundles... Invalid substitution "../../../../../.. /@localSearchIndex" for placeholder "[name]" in "output. chunkFileNames" pattern, can be neither absolute nor relative path.

能否支持生成importmap?

做了如下配置:

chunkSplitPlugin({
  strategy: 'single-vendor',
  customSplitting: {
    'react': ['react'],
    'react-dom': ['react-dom'],
  }
})

希望能在index.html中生成importmap:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title></title>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <script type="module" crossorigin src="assets/index.1a26244a.js"></script>
  <link rel="modulepreload" href="assets/react.3459aa3e.js">
  <link rel="modulepreload" href="assets/react-dom.73ff7b2c.js">
  <link rel="modulepreload" href="assets/vendor.1d4c9fbb.js">
  <link rel="stylesheet" href="assets/vendor.6e2d8938.css">
<body>
  <script type="importmap">
    {
      "imports": {
        "react": "assets/react.3459aa3e.js",
        "react-dom": "assets/react-dom.73ff7b2c.js"
      }
    }
  </script>
  <div id="app"></div>
</body>
</html>

这里不局限于react。有可能是私有库。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.