Answers for "The script has an unsupported MIME type ('text/html')."

0

The script has an unsupported MIME type ('text/html').

A quick fix would be to copy the service-worker.js file to the public folder 
so that when you hit http://localhost:3000/service-worker.js you see the file 
in the browser.
Posted by: Guest on August-23-2021
0

the script has an unsupported mime type (

app.get("/service-worker.js", (req, res) => {
  res.sendFile(path.resolve(__dirname, "public", "service-worker.js"));
});
app.get("*", function response(req, res) {
  res.sendFile(path.join(__dirname, "public", "index.html"));
});
Posted by: Guest on July-31-2021

Code answers related to "The script has an unsupported MIME type ('text/html')."

Browse Popular Code Answers by Language