• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mikaelhg/spring-boot-webpack-es6-react-poc: Kotlin + Spring Boot + Webpack + Bab ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mikaelhg/spring-boot-webpack-es6-react-poc

开源软件地址(OpenSource Url):

https://github.com/mikaelhg/spring-boot-webpack-es6-react-poc

开源编程语言(OpenSource Language):

JavaScript 52.8%

开源软件介绍(OpenSource Introduction):

POC: Kotlin + Spring Boot + Webpack + Babel + ReactJS

mvn clean package spring-boot:run

The project provides backend services using Spring Boot, and generates a nice clean JavaScript frontend using the Maven Frontend plugin to first fetch a relevant Node.JS binary package, NPM, then run npm install to fetch a shitload of JS modules, and execute WebPack through npm run prod-build.

WebPack goes on to load its Babel.JS module, and configure it with ES2015 and React Babel profiles.

Babel then transpiles the JavaScript input files from shiny new ES2015 to ES5, which shitty browsers can actually run.

WebPack slams all this JavaScript together: the entrypoint JS file set in the configuration file, everything that file imports, and everything THAT imports, ad nauseam, into the (possibly giant) target/classes/static/bundle.js file.

Take a look at the src/main/frontend directory, and the configuration files and ES6 entry point there.

Basically this should work on Linux x86 and x64, Windows 32 and 64 bit, and OSX. Should.

You can also install NVM, have NVM install Node.JS LTS, upgrade your NPM to newest, then run npm install and npm run-script dev-build to manually compile the stuff. It should be pretty easy to set up a watchdog to automatically build things, and trigger LiveReload.

But that's a story to be explored on some other night.

IntelliJ IDEA users

File -> Settings -> Languages & Frameworks -> JavaScript:

JavaScript language version: JSX Harmony

Libraries -> ECMAScript 6: Enabled


File -> Settings -> Build, Execution, Deployment -> Compiler:

Make project automatically: Enabled


CTRL-SHIFT A -> Registry... :

compiler.automake.allow.when.app.running: Enabled




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap