grawk / construx-browserify

construx plugin to generate browserify bundles on the fly
Other
0 stars 0 forks source link

Can't get work with kraken! #1

Closed 9n closed 8 years ago

9n commented 8 years ago

I can't get this module works. When i request http://localhost:8000/js/app.js in browser, i get the original file. When i build my project, everything works fine. Here is my config:


    "middleware": {

        "devtools": {
            "enabled": true,
            "priority": 35,
            "module": {
                "name": "construx",
                "arguments": [
                    "path:./public",
                    "path:./.build",
                    {
                        "browserify": {
                            "module": "construx-browserify",
                            "files": "**/*.js",
                            "bundles": {
                                "/js/app.js": {
                                    "src": "path:./public/js/app.js",
                                    "options": {
                                        "transform": ["reactify", "require-globify"]
                                    }
                                }
                            }
                        },

                        "template": {
                            "module": "construx-dustjs",
                            "files": "/templates/**/*.js",
                            "base": "templates"
                        },

                        "css": {
                            "module": "construx-less",
                            "files": "/css/**/*.css"
                        },

                        "copier": {
                            "module": "construx-copier",
                            "files": "**/*"
                        }
                    }
                ]
            }
        }
    }
}
9n commented 8 years ago

I realized that it's because of construx-copier module, which overwrite the app.js file. I should exclude the app.js from construx-copier module.


                        "copier": {
                            "module": "construx-copier",
                            "files": "**/!(*.js)"
                        }