A temporary solution to that is to disable the RequireJS's require, delete the ambient declaration for requirejs's require.
/typings/requirejs/require.d.ts
// Ambient declarations for 'require' and 'define' declare var requirejs: Require; // declare var require: Require // Delete or uncomment this declare var define: RequireDefine;
This client-side config.ts won't work anymore:
requirejs.config({ paths: { "jquery": "/jquery/dist/jquery" } }); require(['app']); // this won't work
To make that work, access the client-side require via window object.
requirejs.config({ paths: { "jquery": "/jquery/dist/jquery" } }); var need : Require = window["require"]; need(['app']);
No comments:
Post a Comment