Next.js Discord

Discord Forum

Taking build in a customised way

Unanswered
Sporting Lucas Terrier posted this in #help-forum
Open in Discord
Sporting Lucas TerrierOP
Hey all, I need to create the build for my next app. I want to have the JavaScript files in one separate file, named "ichatbotFrame.js," and the HTML in another separate file "ichatbotFrame.html". How do I do that?
I have tried but I'm not getting it.. If anyone knows gimme the next.config please

10 Replies

already told you. This is not how nextjs.
If you arent even using the only things next provides, you should probably not be using it. React Server Components are not a nextjs thing. Next just builds on top of it. Exporting a file in your angular projects CANNOT provide you ANY benefits of react server-side rendering or nextjs
@Clown already told you. This is not how nextjs.
Sporting Lucas TerrierOP
But Webpack customization is possible in next js right? then, why not we can take a separate build for js and html files?
I have already tried this but it went on loop like it creates all the files in a same name like ichatbotFrame.js like that
You can do static export to generate the html and js files for you. That however is basically getting rid of much of what nextjs can provide you
If I am not wrong, to generate only one JS file you will need to change the webpack config used by nextjs internally
also you want one page, which definitely isnt gonna happen even with static export. Secondly, you arent using Server-side rendering at all or any dynamic content OR navigation OR caching or any kind of optimization.

So what are u gonna use nextjs for exactly>