I want to create a custom webpack loader but I can't find how to make it working with Turbopack.
Here's my working next.config.ts:
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "export",
turbopack: {
rules: {
"*.tsx": {
loaders: [{ loader: "next-public", options: { shouldLog: true, autoDetect: true } }],
as: "*.js",
},
},
},
};
export default nextConfig;
But if I do something like :
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "export",
/* config options here */
turbopack: {
rules: {
"*.ts": {
loaders: [{ loader: "next-public", options: { shouldLog: true, autoDetect: true } }],
as: "*.js",
},
},
},
};
export default nextConfig;
It's not working properly, I can't get log from the loader