Vanilla.js客户端路由+Webpack懒加载:资源因MIME类型不匹配被拦截
问题:Webpack懒加载+VanillaJS客户端路由在嵌套路由下直接访问失效
使用Webpack实现懒加载(绿色编码)后,Vanilla.js客户端路由在/blog/2这类嵌套路由上失效。通过带data-btnref="navlink"的按钮链接访问正常,但直接在浏览器地址栏输入地址会触发以下报错:
GET http://localhost:3000/blog/main8f1360562bd664fccb25.js [HTTP/1.1 404 Not Found 3ms]
The resource from “http://localhost:3000/blog/main8f1360562bd664fccb25.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Loading failed for the
相关产品推荐
相关产品推荐

