Skip to content

Conversation

@ansuz
Copy link

@ansuz ansuz commented Jun 24, 2016

modify define call for improved compatibility with requirejs.

modify define call for improved compatibility with requirejs.
@ansuz
Copy link
Author

ansuz commented Jun 24, 2016

from http://requirejs.org/docs/api.html#modulename

These are normally generated by the optimization tool. You can explicitly name modules yourself, but it makes the modules less portable -- if you move the file to another directory you will need to change the name. It is normally best to avoid coding in a name for the module and just let the optimization tool burn in the module names.

We're using sortify for cryptpad, and the only way we can currently make it work with requirejs is to include require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } });

@ThomasR
Copy link
Owner

ThomasR commented Jan 13, 2017

I finally found some time to look at this.

Sorry, but I don't really understand how removing the module name would resolve your issue. Are you sure that's a fix?

If it is, we're probably gonna have to update the AMD mock in test-amd.html, but I also need to have a closer look at requireJS's internals in order to make sure nothing breaks.

@ThomasR ThomasR force-pushed the master branch 2 times, most recently from f475ea9 to ffeea9d Compare September 2, 2017 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants