mikew / browserify-brunch

Brunch + Browserify
10 stars 7 forks source link

Example to set instanceOptions config #3

Closed eriknyk closed 9 years ago

eriknyk commented 9 years ago

Hi,

I want to pass the param -d to browserify plugin to generate the .map file and debug the my script I tried

    plugins: {
        browserify: {
            extensions: 'js',
            instanceOptions: ['-d'],
            bundles: {
                'js/bundle.js': {
                    entry: './client.js'
                }
            }
        }
    }

And it doesn't works, I've tried too:

instanceOptions: ['d'], instanceOptions: ['--debug'], without luck,

Please help me, Regards.

mikew commented 9 years ago

The debug option should be set for you, but it looks like browserify has changed since this plugin was written

the options passed to instanceOptions are not the command line arguments, read about them here

you're also setting them in the wrong place

    plugins: {
        browserify: {
            extensions: 'js',
            bundles: {
                'js/bundle.js': {
                    entry: './client.js',
                    instanceOptions: { debug: true }
                }
            }
        }
    }

this is all in the readme