ericclemmons/grunt-react

How to pass in options into browserify transform?

mathew-kurian opened this issue · 3 comments

Currently, I have a config as shown below. Is the ignoreMTime property placed in the correct place for browserify to read it as a valid option for the transform?

browserify: {
            options: {
                transform: [[gruntReact.browserify, {ignoreMTime: true}], configify, nwjsify],
                browserifyOptions: {
                    debug: true // source mapping
                }
            },
            dev: {
                src: ['asr/*.jsx', 'asr/**/*.jsx', 'asr/**/*.js'],
                dest: 'public/js/compiled/bundle.js',
                options: {
                    watch: true, // use watchify for incremental builds!
                    keepAlive: true // watchify will exit unless task is kept alive
                }
            },
            prod: {
                src: ['asr/*.jsx', 'asr/**/*.jsx', 'asr/**/*.js'],
                dest: 'public/js/compiled/bundle.js'
            }
        },

Actually, I think this project is superseded by https://github.com/babel/grunt-babel thanks to:

http://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html

But, based on what I'm reading, you what to do gruntReact.browserify({ ignoreMTime: true }).

Oh wait, no. I just read my own docs :)

options: {
  transform: [gruntReact.browserify, configify, nwjsify],
  browserifyOptions: {
    ignoreMTime: true,
    debug: true // source mapping
  }

This project is no longer maintained.