Created
February 24, 2017 09:15
-
-
Save JeroenVinke/a839ff0e51a3a144f057aaf8c9405a9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require.config({ | |
| paths: { | |
| "my-plugin": "./my-plugin" | |
| } | |
| }); | |
| define("my-plugin", []); | |
| define(["my-plugin!./test.css"], function (r) { | |
| console.log(r) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>GistRun</title> | |
| </head> | |
| <body> | |
| <h1>Hello world!</h1> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.js" data-main="failing"></script> | |
| <!--<script src="./text.js"></script>--> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define("my-plugin", function (input) { | |
| return { | |
| normalize: function (i) { | |
| return i; | |
| }, | |
| load: function (name, req, onLoad, config) { | |
| return onLoad("some content"); | |
| } | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment