Adding a config option to stop assuming module filenames end in .js #1249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a config option to stop assuming module filenames end in .js
When disableAutoJsExt: true, is set you have to pass complete file
names including extension when requiring modules such as foo.js or
foo.njs instead of foo
I am using require.js server side with node.js and I need to name my
modules .njs or .model etc to separate them from static .js files.
The noext plugin does not work serverside with node.js and I feel
assuming a file ext is unwise in general. If I missed an obvious way
to accomplish this, please let me know. Someone more familiar with
requirejs code then me should review and modify this patch as needed.
Making sure it doesn't break anything (like undef etc).
However it is done I think allowing non .js file extensions for
module files is important.