Add an example on how to use webpack with webextensions

This commit is contained in:
Martin Giger
2016-09-21 17:45:11 +02:00
parent ed25a238bf
commit 71641abd14
8 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
const leftPad = require("left-pad");
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
const result = leftPad(message.text, message.amount, message.with);
sendResponse(result);
});