A
A
Archakov Dennis2019-08-25 00:15:06
Node.js
Archakov Dennis, 2019-08-25 00:15:06

How to remove versioning from Next.js scripts?

A parameter is attached to each CSS and JS file ?ts=XXX, which causes the files to be loaded in a new way with each update.
I studied the documentation, I did not find anything about this. How can I remove this option?

/_next/static/runtime/main.js?ts=1566646167365 -> ts=1566646167365

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Archakov Dennis, 2019-08-25
@archakov06

It's all right, I should have been more careful. I rummaged through the sources of Next.js, it turned out that when building in prod, I did not specify `NODE_ENV=production`, because of which, this `ts` (timestamp)` was added to the build.
https://github.com/zeit/next.js/blob/canary/packag...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question