Turbopack can't load module type yaml
Unanswered
Southeastern blueberry bee posted this in #help-forum
Southeastern blueberry beeOP
My next.config.ts is as follows:
As is on the documentation (i think)?
When I run dev as webpack it works
But on turbopack it says:
Build error
Unknown module type
./src/lib/translations/en.yaml
Unknown module type
This module doesn't have an associated type. Use a known file extension, or register a loader for it.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Webpack configuration for non-Turbopack builds
webpack: (config) => {
config.module.rules.push({
test: /\.ya?ml$/,
use: "yaml-loader",
});
return config;
},
// Turbopack configuration
turbopack: {
rules: {
"**/*.ya?ml": [{
loader: "yaml-loader",
options: {},
}]
},
}
};
export default nextConfig;
As is on the documentation (i think)?
yaml-loader
certainly is as working.When I run dev as webpack it works
But on turbopack it says:
Build error
Unknown module type
./src/lib/translations/en.yaml
Unknown module type
This module doesn't have an associated type. Use a known file extension, or register a loader for it.