Skip to content

Instantly share code, notes, and snippets.

View taotao9125's full-sized avatar
🧐
I may be slow to respond.

下南山 taotao9125

🧐
I may be slow to respond.
View GitHub Profile
@taotao9125
taotao9125 / ics
Last active December 14, 2023 08:39
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:adamgibbons/ics
METHOD:PUBLISH
X-PUBLISHED-TTL:PT1H
BEGIN:VEVENT
UID:R8UYFsvefIukthSRU1vxV
SUMMARY:DTC文章
DTSTAMP:20231214T083913Z
@taotao9125
taotao9125 / esm-package.md
Created July 31, 2023 11:50 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
/*!
* ExternalTemplateRemotesPlugin
* License: MIT (https://mit-license.org/)
*/
const extractUrlAndGlobal = require('webpack/lib/util/extractUrlAndGlobal');
const { RawSource } = require('webpack-sources');
const PLUGIN_NAME = 'ExternalTemplateRemotesPlugin';
@taotao9125
taotao9125 / MutateRuntimePlugin.js
Created December 22, 2021 10:10 — forked from ScriptedAlchemy/MutateRuntimePlugin.js
Remote PublicPath Modification
const PLUGIN_NAME = "MutateRuntimePlugin";
class MutateRuntimePlugin {
/**
*
* @param {FederationDashboardPluginOptions} options
*/
constructor(options) {}
/**
@taotao9125
taotao9125 / nginxproxy.md
Created June 5, 2017 10:58 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers