ayroblu / ssr-create-react-app-v2

This is the v2, its much better written, and uses react-router v4, which is actually pretty nice
230 stars 50 forks source link

Add Babel Plugins #6

Closed agungsb closed 7 years ago

agungsb commented 7 years ago

Is there anyway to add babel plugins?

I added babel-resolver and babel-plugin-transform-remove-console modules to the project. Then I made some edit in app.js:

require('babel-register')({
  ignore: /\/(build|node_modules)\//,
  presets: ['env', 'react-app'],
  plugins: [
    "transform-remove-console"
  ],
  resolveModuleSource: require('babel-resolver')(basePath)
})

The babel-resolver works fine, but the transform-remove-console seems not processed at all.

Any thoughts, @ayroblu ? Thanks.

ayroblu commented 7 years ago

Umm, not sure if this is server side or client side. app js is client side right? Perhaps adjusting a babelrc might work? But yeah alittle confused where this is