Skip to content

Commit

Permalink
Add note about working around requirejs limitations to manual
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jun 2, 2015
1 parent 5b69b03 commit 32c258f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion doc/manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,20 @@ <h3 id=modloader>Module loaders</h3>
});</pre>

<p>It will automatically load the modes that the mixed HTML mode
depends on (XML, JavaScript, and CSS).</p>
depends on (XML, JavaScript, and CSS). Do <em>not</em> use
RequireJS' <code>paths</code> option to configure the path to
CodeMirror, since it will break loading submodules through
relative paths. Use
the <a href="http://requirejs.org/docs/api.html#packages"><code>packages</code></a>
configuration option instead, as in:</p>

<pre data-lang=javascript>require.config({
packages: [{
name: "codemirror",
location: "../path/to/codemirror",
main: "lib/codemirror"
}]
});</pre>

</section>

Expand Down

0 comments on commit 32c258f

Please sign in to comment.