Skip to content

Bundling css ends up with only first file instead of all occurences of require("[...]/[somename].css");  #62

@ghost

Description

As in title. Bundling css files ends up with only first file in bundle.css instead of all occurences of require("[...]/[somename].css"); in all js files that participate.

Is there some option for enabling concatenated?

It is (from docs):

onFlush = (options, done) => {
  Fs.appendFileSync(outputPath, options.data);
  done(null); // Do not embed CSS into a JavaScript bundle
};

and at the beginning of bundling we need to unlink file outputPath

problem is when we use watchify

Because of removing outputPath file at the beginning of bundling, cached(by watchify) .js modules that required css files won't require css files again in case when .js module hasn't changed, but they need to because we've removed whole css bundle.

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions