-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pwacompat.min.js:1 Uncaught SyntaxError: Unexpected token < #3466
Comments
查看生成的pwacompat.min.js 是一段html 而不是js |
是因为没有生成 |
pwacompat.min.js 这个文件antd pro原工程生成的 不修改部署路径是能够正常生成一段js,修改部署路径后才会出错。 |
看来是 pwa 生成的。参照 |
关掉还是会生成pwa相关文件,自动生成的html文件中,还是引入了pwa |
pwa:false 依然存在本问题 |
经测试,pwa:false确实还是存在这个问题 |
经测试,把 pwa设置成false,问题已解决! 我的这个问题出现原因:因为我在config.js 加了 publicPath: '',才导致的 |
#ffalconjs 你把 publicPath: '/nScreen/', 删掉就ok了 |
@jing-wu @ffalconjs @mathcw
修改为:
即三目运算后面的配置为 false 而不是 空对象 |
当需要将项目部署到非根目录时,在config.js增加如下配置
history: 'hash',
base: '/nScreen',
publicPath: '/nScreen/',
outputPath: './nScreen',
执行npm start
在浏览器控制台报错
pwacompat.min.js:1 Uncaught SyntaxError: Unexpected token <
The text was updated successfully, but these errors were encountered: