Check Intl config for inputPath#95
Conversation
|
out of curiosity, why are you using a different path? |
|
We use bit to share and edit files between projects, store them (including our translations) under a subdirectory. This lets our front-end team make changes to our translation files during development, and keep those changes in sync for our back-end team without having to manage multiple npm repositories/releases. In either case, given that this option is available to intl users, its a good idea to support it in the analyzer? |
|
|
||
| let config; | ||
| if (fs.existsSync(configPath)) { | ||
| let requireESM = require('esm')(module); |
There was a problem hiding this comment.
the default ember-intl blueprint is using module.exports (not export default), so I'm not sure why we would need to support ES module files here.
also, I would assume that the default export would still be a function, but it seems that the code below does not call the default and assumes that it is an object directly, right?
There was a problem hiding this comment.
Have ember-intl changed their setup recently because this PR worked when I opened it
There was a problem hiding this comment.
I'm not sure. I've checked in a few of my projects that use ember-intl and they all use module.exports 😅
Checks for
inputPathoption inconfig/ember-intl.js.I've also pulled in the change from #94 as I couldn't run the code without it.