This will help you to remove console.log and comments from typescript or javascript files using webpack 4
webpack remove console.log
npm i npm install uglifyjs-webpack-plugin --save-dev| { | |
| "name": "lit", | |
| "license": "MIT", | |
| "scripts": { | |
| "build": "npm install && rollup -c" | |
| }, | |
| "dependencies": { | |
| "@rollup/plugin-node-resolve": "^13.0.0", | |
| "lit": "^2.0.0-rc.2", | |
| "rollup": "^2.52.7" |
This will help you to remove console.log and comments from typescript or javascript files using webpack 4
webpack remove console.log
npm i npm install uglifyjs-webpack-plugin --save-dev| /* | |
| * Use tag to import via es6 module (html import deprecated in v1 spec :/ ) | |
| * <script type="module" src="../components/web-component/web-component.js"></script> | |
| */ | |
| 'use strict()' | |
| const template = document.createElement('template') | |
| template.innerHTML = /*html*/` | |
| <style> | |
| .card { |
| -------------------------------------------------------------------- | |
| -- Queries related to distribution of metadata. | |
| -- Find the number of users per profile. | |
| SELECT count(id), Profile.name | |
| FROM User | |
| WHERE User.IsActive = true | |
| GROUP BY Profile.name | |
| -- Find the distribution of Apex classes per namespace. | |
| select count(id), NameSpacePrefix |
| <apex:page> | |
| <head> | |
| <script src="{!$Resource.jquery224}"></script> <!-- https://jquery.com/ --> | |
| <script src="{!$Resource.jsforce170}"></script> <!-- https://jsforce.github.io/ --> | |
| <script>$j = jQuery.noConflict();</script> | |
| </head> | |
| <body> | |
| <form> |
| module.exports = function atob(a) { | |
| return new Buffer(a, 'base64').toString('binary'); | |
| }; |
| <html> | |
| <head> | |
| <title>API Example</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| var accessToken = "<your agent's client access token>"; | |
| var baseUrl = "https://api.api.ai/v1/"; |
| const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
| async function something() { | |
| console.log("this might take some time...."); | |
| await delay(5000); | |
| console.log("done!") | |
| } | |
| something(); |
| /* | |
| // Example implementation as follows: | |
| public class AWSS3_GetService extends AWS { | |
| public override void init() { | |
| endpoint = new Url('https://s3.amazonaws.com/'); | |
| resource = '/'; | |
| region = 'us-east-1'; | |
| service = 's3'; | |
| accessKey = 'my-key-here'; | |
| method = HttpMethod.XGET; |
| /** | |
| * Changes XML to JSON | |
| * Modified version from here: http://davidwalsh.name/convert-xml-json | |
| * @param {string} xml XML DOM tree | |
| */ | |
| function xmlToJson(xml) { | |
| // Create the return object | |
| var obj = {}; | |
| if (xml.nodeType == 1) { |