You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there are .ts files in the content folder, we get a warning message in the Build console output from line 47 of content/src/runtime/transformers/index.ts...
console.warn(`${ext} files are not supported, "${id}" falling back to raw content`)
Perhaps this should throw an error to stop the build and force it to break.
Otherwise, here is the scenario that played out today, and could break production builds for others too...
When developing in dev mode, there is no warning about putting .ts files in the content folder. Everything just works perfectly. There are also no docs about keeping .ts files in the content folder.
When doing a build there is no error, only this one warning (from line 47) that is embedded within thousands of lines of build output, and the build does not fail.
CI or Devops thinks all is good. So they deploy the site to production where the website totally breaks because it cannot find the code it needs.
Additional context
If we don't stop the build when things are not correct, then it can lead to broken websites getting deployed to production. We should also add to the docs about unsupported file extensions in the content folder.
Logs
Not needed.
The text was updated successfully, but these errors were encountered:
Because we are implementing I18n, which calls for language files. While these files are TS, they look, and feel a lot like typical content files. So we figured the content folder was a really good fit. It worked perfectly in dev, broke badly in production.
Environment
Not needed.
Reproduction
Not needed.
Describe the bug
When there are .ts files in the content folder, we get a warning message in the Build console output from line 47 of content/src/runtime/transformers/index.ts...
content/src/runtime/transformers/index.ts
Line 47 in f753723
Perhaps this should throw an error to stop the build and force it to break.
Otherwise, here is the scenario that played out today, and could break production builds for others too...
When developing in dev mode, there is no warning about putting .ts files in the content folder. Everything just works perfectly. There are also no docs about keeping .ts files in the content folder.
When doing a build there is no error, only this one warning (from line 47) that is embedded within thousands of lines of build output, and the build does not fail.
CI or Devops thinks all is good. So they deploy the site to production where the website totally breaks because it cannot find the code it needs.
Additional context
If we don't stop the build when things are not correct, then it can lead to broken websites getting deployed to production. We should also add to the docs about unsupported file extensions in the content folder.
Logs
The text was updated successfully, but these errors were encountered: