Opened 17 months ago

#19040 new defect

Can't call require.toUrl() if loader is built with 'dojo-inject-api'==0

Reported by: chuckd Owned by: dylan
Priority: undecided Milestone: tbd
Component: Loader Version: 1.12.2
Keywords: Cc:
Blocked By: Blocking:

Description

It's because require.toUrl(...) calls fixupUrl(...), which is declared within a has('dojo-inject-api') conditional. fixupUrl(...) should be moved outside the has('dojo-inject-api') conditional so that require.toUrl(...) can be used when the loader is built with with 'dojo-inject-api' == 0.

Use case: dojo-webpack-plugin (https://github.com/OpenNTF/dojo-webpack-plugin) embeds a built loader into the packed application. The built loader could be made about .5KB smaller, or about 3.7KB total size (after uglify and gzip), if the loader could be built without 'dojo-inject-api', but doing so results in a function undefined error when require.toUrl(...) tries to call fixupUrl(...).

I've posted the pull request https://github.com/dojo/dojo/pull/266 to fix this problem.

Change History (0)

Note: See TracTickets for help on using tickets.