Hi I am quite new to advance frontend technologies and I have simple question.
scenario
I would like to use next.js and its feature: server side rendering. I would like also to have my js, css and html files stored in outside of host machine where next.js is running. I want to have my files in azure blob storage. It is neccessary because I would like to have many SPA pages and single wwwroot directory is not enough for me.
Problem
By default next.js get its files from pages
directory at host machine.
Is it possible to tell next.js to get files from other file system etc. In this scenario it would be azure storage. I could not find any example or extension point to do that.
Juan Pablo Isaza
Thank you psygik. Posting your suggestion as an answer to help other community members.
You can only define your page structure in
pages
directory. After build, Next.js serves the static JS and CSS from.next/static/
folder. Contents of which can be moved to a storage uploaded as_next/static/
You can refer to CDN Support with Asset Prefix, API/next.config.js/CDN Support with Asset Prefix and How to serve static generated pages via CDN with Next.js