Skip to content

Instantly share code, notes, and snippets.

@SevInf
Last active August 26, 2018 08:19
Show Gist options
  • Select an option

  • Save SevInf/8dc6442b92dfdcc8e3d8b7b46d0ddef8 to your computer and use it in GitHub Desktop.

Select an option

Save SevInf/8dc6442b92dfdcc8e3d8b7b46d0ddef8 to your computer and use it in GitHub Desktop.
URL semantics of ES2015 modules
import { increment } from './counter.mjs';
import { counter } from './counter.mjs?someQueryParameter';
console.log(counter); // prints 1
increment();
console.log(counter); // still prints 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment