Skip to content

Benefits of writing file to disk after webpack finished running? #3

@fed

Description

@fed

Shall we write the file to disk only after Webpack finished bundling our code? We could make use the compiler done callback as noted here on the official docs.

function HelloWorldPlugin(options) {
  // Setup the plugin instance with options...
}

HelloWorldPlugin.prototype.apply = function(compiler) {
  compiler.plugin('done', function() {
    console.log('Hello World!'); 
  });
};

module.exports = HelloWorldPlugin;

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions