Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Created March 10, 2018 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheLarkInn/6f74d916ab3ab03f35ea25d0e96e35ff to your computer and use it in GitHub Desktop.
Save TheLarkInn/6f74d916ab3ab03f35ea25d0e96e35ff to your computer and use it in GitHub Desktop.
import PaintModule from "./somePaintModule.js";
/**
* if user wanted to code split they pass
* const PaintModule = () => import("./somePaintModule.js")
*/
CSS.paintWorklet.addModule(PaintModule)
// Therefore the surface api operates the same in the users eyes
// and gives code splitting first class support
@natew
Copy link

natew commented Apr 17, 2019

Is this planned for webpack?

@guidobouman
Copy link

This does not seem to work. Is there a better way to load modules without creating new entypoints, and hardcoding their paths?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment