Skip to content

Watch not catching css changes in symlink components #46

Description

@Galderak

Using Gulp with parcelify works perfectly during the initial bundle().

However any changes made to css files inside one of my sym-linked components does not trigger a 're-bundle' of any kind.

OS: Windows 10

project
-node_modules
--component < this is a symlink via npm link
---src
----css
-----style.css < changes here are not triggering a re-build, the initial bundle includes this file correctly.

-- gulpfile.js

var index = browserify({
    entries  : __dirname + '/src/index.js',
    debug    : true,
    paths   : ['./node_modules'],
    transform: babelify,
    cache:{},
    packageCache:{},
    plugin:[watchify,parcelify]
});

var p = parcelify(index,{
    watch: true,
    bundles:{
        style:'./public/css/components.css'
    }
}).on('error',function(err){
    console.log("Component CSS Error:", err);
}).on('done',function(){
    console.log("Component CSS has been Finished");
}).on('assetUpdated', function (eventType, asset) {
    console.log("Component CSS has been updated", eventType, asset);
})

var w = watchify(index);

function indexBundle() {
    return index.bundle()
    .on('error', function (err) {
        console.error(err);
    })
    .pipe(source('index.js'))
    .pipe(buffer())
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('public'))
}

Not sure what the issue is but any assistance would be greatly appreciated, parcelify is the only solution I've found that works well for bundling deeply nested css dependencies with React components that also does not include multiple version of the same css files from different component dependencies etc.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions