I have a browser task that is configured like this:
module.exports = function(grunt) {
grunt.config.set('browserify', {
dev: {
src: 'assets/js/main.jsx',
dest: '.tmp/public/js/main.js',
options: {
debug: true,
extensions: ['.jsx'],
transform: ['reactify']
}
}
});
grunt.loadNpmTasks('grunt-browserify');
};
I tried setting it up in such a way as to use es6:
module.exports = function(grunt) {
grunt.config.set('browserify', {
dev: {
src: 'assets/js/main.jsx',
dest: '.tmp/public/js/main.js',
options: {
debug: true,
extensions: ['.jsx'],
transform: ['reactify', {'es6': true}]
}
}
});
grunt.loadNpmTasks('grunt-browserify');
};
This causes an error:
Error: path must be a string
I canβt understand from the docs how to do this, given that I donβt want to configure the conversion in my package.json. Any help would be appreciated.
source
share