前端是webpack+React的一個小demo,直接訪問頁面無報錯使用web.py作為本地服務器時 控制臺輸出 Uncaught SyntaxError: Unexpected token <經驗證發現 代碼中出現<script type="text/javascript" src="./out/bundle.js"></script>時報錯bundle.js為webpack打包出的文件前端代碼在https://github.com/shisi1010/...python代碼 # -*- coding: utf-8 -*- import web render = web.template.render('react_webpack') urls = ( '/index', 'index', '/(.*)', 'hello' ) app = web.application(urls, globals()) class index: def GET(self): query = web.input() return query class hello: def GET(self, name): return render.xxx() if __name__ == "__main__": app.run()
python的web.py 做后臺無法識別webpack 打出的bundle.js
江戶川亂折騰
2019-02-27 10:22:05