Skip to content

Conversation

@MartinKolbAtWork
Copy link
Contributor

Fix proposal for issue #25

@flyfishzy flyfishzy merged commit 70ae949 into originjs:main Feb 17, 2022
@ghost
Copy link

ghost commented Jun 23, 2023

This broke our code (webpack originally, but also using vite):

const messagesDE = {
  ...require('./i18n/de'),
  ...require('./i18n/errorcodes_de.json'),
  ...require('./i18n/requeststatus_de.json'),
}
const messagesEN = {
  ...require('./i18n/en'),
  ...require('./i18n/errorcodes_en.json'),
  ...require('./i18n/requeststatus_en.json'),
}
const messagesPL = require('./i18n/pl')

@ghost ghost mentioned this pull request Jun 23, 2023
MartinKolbAtWork added a commit to MartinKolbAtWork/vite-plugins that referenced this pull request Jun 26, 2023
@MartinKolbAtWork
Copy link
Contributor Author

This broke our code (webpack originally, but also using vite):

const messagesDE = {
  ...require('./i18n/de'),
  ...require('./i18n/errorcodes_de.json'),
  ...require('./i18n/requeststatus_de.json'),
}
const messagesEN = {
  ...require('./i18n/en'),
  ...require('./i18n/errorcodes_en.json'),
  ...require('./i18n/requeststatus_en.json'),
}
const messagesPL = require('./i18n/pl')

Thanks for finding this, @JannikGM
I added a PR that will allow using the spread operator (...) preceeding the require statement:
#47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants