bookmarklet-wrapper-webpack-plugin
v1.0.1
Published
Wraps output file in IIFE and adds 'javascript:' prefix
Downloads
6
Readme
Bookmarklet Wrapper Webpack Plugin
Wraps output file in IIFE and adds 'javascript:' prefix:
javascript: (function() {
// ... file content
})();
Works only in production mode.
Installation
npm install --save-dev bookmarklet-wrapper-webpack-plugin
Usage
const BookmarkletWrapperPlugin = require('bookmarklet-wrapper-webpack-plugin');
module.exports = {
// ...
plugins: [new BookmarkletWrapperPlugin()]
};