I have a page-a.ts
which would compile into page-a.js
:
alert('this is from page-a');
And I have a main.ts
which compiles into main.js
:
import pageA = module('page-a')
alert('this is from main');
And this is my tsc
command line:
tsc --module amd page-a.ts main.ts
And I'm using requirejs
like this:
<script src="require.js" data-main="main.js"></script>
I can't see the alert messagebox from page-a
when loading the page. And in the generated scripts main.js
, there is nothing about page-a
.
My question is, why is this happening? And how do I force typescript to import a module that is not explicitly used by the code?