Skip to content

Instantly share code, notes, and snippets.

View blittle's full-sized avatar
🇺🇦

Bret Little blittle

🇺🇦
View GitHub Profile
@blittle
blittle / index.html
Created August 14, 2017 21:39
simple-example
<!DOCTYPE html>
<html>
<body>
<script src="dist/app.js"></script>
</body>
</html>
@blittle
blittle / dynamic.html
Created August 14, 2017 21:40
dynamic
<!DOCTYPE html>
<html>
<body>
<script>
// RequireJS
requirejs('dist/app.js');
// SystemJS
SystemJS.import('dist/app.js');
@blittle
blittle / overrides.html
Last active August 14, 2017 22:54
overrides
<!DOCTYPE html>
<html>
<body>
<script>
import(`${getDomain()}/app.js`);
function getDomain() {
const override = localStorage.getItem('override');
if (override === 'beta') return 'https://beta.myapp.com';

@lovedota this is definitively possible with webpack if you use the tried and true AMD module specification as the output target in your webpack bundles. You will also need to treat each app as an external for each other app. For example, in the webpack configuration for each of your micro-apps:

module.exports = {
  output: {
    library: "app1", // for subsequent apps, change them to a different name
    libraryTarget: "amd"
  },
  ...
 externals: [
@blittle
blittle / babel-types.md
Created April 13, 2020 21:25 — forked from joshblack/babel-types.md
Documentation of all the Babel type methods

Babel Types

Hopefully will be documentation of unclear methods available for Babel Types

  • is
  • isType
  • shallowEqual
  • appendToMemberExpression
  • prependToMemberExpression
  • ensureBlock
test
@blittle
blittle / cloudSettings
Last active September 17, 2021 14:59 — forked from joeldenning/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-17T14:59:17.023Z","extensionVersion":"v3.4.3"}