Skip to content

Instantly share code, notes, and snippets.

@jdb8
Last active December 28, 2016 02:40
Show Gist options
  • Save jdb8/41f3c0394b8af8652b2528aa20fd883f to your computer and use it in GitHub Desktop.
Save jdb8/41f3c0394b8af8652b2528aa20fd883f to your computer and use it in GitHub Desktop.
export const hi = 'foo';
function HelloWorldPlugin(options) {}
HelloWorldPlugin.prototype.apply = function(compiler) {
compiler.plugin('emit', function(compilation, callback) {
delete compilation.assets['output.js'];
callback();
});
};
module.exports = HelloWorldPlugin;i
import hi from './foo.js';
var HelloWorldPlugin = require('./hello-world-plugin.js');
module.exports = {
entry: './index.js',
output: {
path: 'dist',
filename: 'output.js'
},
plugins: [
new HelloWorldPlugin(),
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment