updated packages
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
webpack: (config) => {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
config.module.rules.push({
|
||||
test: /\.(jsx|tsx)$/,
|
||||
exclude: /node_modules/,
|
||||
enforce: "pre",
|
||||
use: "@dyad-sh/nextjs-webpack-component-tagger",
|
||||
});
|
||||
}
|
||||
return config;
|
||||
experimental: {
|
||||
turbo: {
|
||||
rules: {
|
||||
// Option 1: Apply the Dyad loader to all React files
|
||||
'*.{tsx,jsx}': {
|
||||
loaders: ['@dyad-sh/nextjs-webpack-component-tagger'],
|
||||
as: '*.tsx', // Tells Turbopack to treat the output as a React component
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// We keep this empty webpack function or remove it entirely.
|
||||
// If you remove it, the "conflict" warning disappears naturally.
|
||||
// If you keep it, it acts as a fallback if you ever run "next dev --webpack".
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user