How to use grunt-react with grunt-browserify?
djanosik opened this issue · 3 comments
djanosik commented
Hi,
I would like to use grunt-react
together with grunt-browserify
. I've tried to follow your instructions, but the require('grunt-react').browserify
always returns null
. My Gruntfile.js
looks like this.
module.exports = function (grunt) {
grunt.initConfig({
browserify: {
app: {
files: {
"wwwroot/js/app.js": ["Scripts/App.js"]
},
options: {
transform: [require('grunt-react').browserify]
}
}
},
browserifyBower: {
lib: {
options: {
file: "wwwroot/lib.js",
checkVersions: false
}
}
},
bower: {
install: {
options: {
layout: "byComponent",
targetDir: "wwwroot/lib",
cleanTargetDir: false
}
}
}
});
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-browserify-bower");
grunt.loadNpmTasks("grunt-bower-task");
grunt.registerTask("default", [
"bower:install",
"browserify"
]);
};
Did I miss something?
Thank you!
apendua commented
👍
ericclemmons commented