DEV Community


Discussion on: Alternative for __dirname in Node when using ECMAScript modules

routinepoutine profile image

I'm here because of Express, where I can't apply style sheets to pug through EcmaScript 2015 import, but only through require && __dirname, 'public'

brcontainer profile image
Guilherme Nascimento Author

Thanks for commenting. I didn't get to test the "pug" with express, but I believe that "import" recognizes the different formats ("modules" and "export"), maybe it is an internal problem, I will test it as soon as possible. If it is something you need to configure comment explaining here.