摘要: 1、CommonJS require("module"); require("../file.js"); exports.doStuff = function() {}; module.exports = someValue; 优点:Node.js采用了这个规范,npm中模块数量多 缺点:同步加载模 阅读全文
posted @ 2021-12-29 16:27 远方的少年🐬 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1、ES模块是如何使用的 通常我们使用 ES module 都是 // app.tsx import React, { Component } from 'react' import { Provider } from 'react-redux' import { store } from './s 阅读全文
posted @ 2021-12-29 16:26 远方的少年🐬 阅读(258) 评论(0) 推荐(0) 编辑