#Build project without /_next/

14 messages · Page 1 of 1 (latest)

shrewd condor
#

When i npm run build, then the static files path are as /_next/static/*
How can I build without /_next? so i only get in my index.html: /static/css/3cbd70ff48da2307.css

final wharfBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

inland wren
shrewd condor
#

bro that aint gonna fix anything

#

its still gonna have _next 💀

inland wren
#

not possible then

sleek basin
#

why do you need this

shrewd condor
#

im trynna serve my .next project from flask

#

and the static files dont work because of the _next inside the paths defined

shrewd condor
#
app = Flask(__name__, static_url_path='/static/', static_folder='/opt/x/hello/code/webserver/templates/sla_frontend/.next/static/', template_folder='/opt/x/hello/code/webserver/templates')

PWD to .next project: "/opt/x/hello/code/webserver/templates/sla_frontend/.next"

So i can load in files from the URL: "http://sla123.2n.dk/static/chunks/603-afa7e6e066e7d5cb.js"

But when I build the project using npm run build then the paths are as defined "/_next/static/chunks/603-afa7e6e066e7d5cb.js"

I dont know how to change my directories and Flask init so that it can load the ones with _next at the start

shrewd condor
#

nvm LOL i just found out why..

#

omg

#

static_url_path is supposed to be _next/static