stealjs / steal-conditional

Conditional loading
https://stealjs.com/docs/steal-conditional.html
MIT License
6 stars 1 forks source link

~ lookup scheme breaks conditional build #31

Closed m-mujica closed 7 years ago

m-mujica commented 7 years ago

Using the app/package name also breaks the automatic detection of string substitution variations.

m-mujica commented 7 years ago

@matthewp is there a normalize hook that transforms/removes from the ~ (or the package name) from the module identifier? or does it happen in a different hook? locate maybe?

For this import:

import i18n from 'substitution-example/locale/#{lang}';

I get the address in the screenshot.

screen shot 2017-01-16 at 16 45 02

That is from calling locate on the normalized module identifier without the condition.

Shouldn't the address be the actual path to the file?