Closed mii9000 closed 8 years ago
That's not a Webpack thing. That's an AMD thing. Because you're using platform in the presence of an AMD loader it assumes you're wanting to use it with the AMD loader.
We should fix this though to align with other projects which export to the global when there's an AMD loader just in case you don't want to load through it.
@jdalton Thanks for the explanation. So, what can I do currently to workaround this?
We'll need to add a bit of code to expose platform
to the global object.
Assuming I can workaround not accessing platform
globally, what other options do I have in consuming it? Like I tried importing import 'platform'
in a .ts
file and while Webpack bundle shows that its doing a require but at runtime its still the same.
When loading through Webpack its seems this is how its setting the
platform
object but throughout the app I getplatform is not defined
when trying to access likeplatform.name
. How should I be accessingplatform
when loading through Webpack?