DEV Community

loading...

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

Collapse
routinepoutine profile image
Matthew

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'

Collapse
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.