Knockstrap currently uses a hardcoded module name when exporting via AMD, which is not recommended practice. I noticed this when trying to use knockstrap, but finding it would only load if served from the root path, because that is the only way the require()'d module ID matches the hardcoded name.
This change only impacts users loading knockstrap via AMD. It does not affect them if they serve knockstrap from the root path (ie at /knockstrap.js), which is the only way it works normally anyway. Anyone else loading knockstrap via AMD on a non-root path would already be using path and map config to work around the problem, so they should also be unaffected. Basically there is little downside to this change.
Knockstrap currently uses a hardcoded module name when exporting via AMD, which is not recommended practice. I noticed this when trying to use knockstrap, but finding it would only load if served from the root path, because that is the only way the
require()
'd module ID matches the hardcoded name.This change only impacts users loading knockstrap via AMD. It does not affect them if they serve knockstrap from the root path (ie at
/knockstrap.js
), which is the only way it works normally anyway. Anyone else loading knockstrap via AMD on a non-root path would already be usingpath
andmap
config to work around the problem, so they should also be unaffected. Basically there is little downside to this change.Here are some further references:
Examples of other knockout plugins (all using anonymous module defines):