shakacode / webpacker_lite

Slimmed down version of Webpacker with only the asset helpers optimized for, but not requiring, React on Rails
https://github.com/shakacode/react_on_rails
Other
46 stars 6 forks source link

Not Using Babel for Webpack Config #18

Closed aaronpod closed 7 years ago

aaronpod commented 7 years ago

After added react on rails with webpacker lite to a Rails 4.2 app, webpacker lite appears not to be using babel which throws an error on the webpack config.

11:57:05 client.1 | const { resolve } = require('path'); 11:57:05 client.1 | ^ 11:57:05 client.1 | 11:57:05 client.1 | SyntaxError: Unexpected token { 11:57:05 client.1 | at exports.runInThisContext (vm.js:53:16) 11:57:05 client.1 | at Module._compile (module.js:373:25) 11:57:05 client.1 | at Object.Module._extensions..js (module.js:416:10) 11:57:05 client.1 | at Module.load (module.js:343:32) 11:57:05 client.1 | at Function.Module._load (module.js:300:12) 11:57:05 client.1 | at Module.require (module.js:353:17) 11:57:05 client.1 | at require (internal/module.js:12:17)

aaronpod commented 7 years ago

Turns out I needed to upgrade Node.js.