webpack入门+react环境配置(2)

<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>React Project</title> </head> <body> <script src="https://localhost:8080/webpack-dev-server.js"></script> <div></div> <script src="https://www.jb51.net/article/bundle.js"></script> </body> </html>

将上面的文件写好后并放到对应文件夹内运行命令npm run build dev,成功后浏览器访问地址location:8080,就会显示出对应界面

结果:

hello react&es2015&webpack!!!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwgjxw.html