I am importing the npm module JSEncrypt in my module to encrypt data. JSEncrypt has window exported global object window.Base64.
I am using webpack to bundle all modules. After bundling I run the code on the browser I can write on console window.Base64 to get the value of this object.
For security and compatibility reasons I would like to prevent that by changing window.Base64 to local scope instead of window.
Is that possible through webpack?
Webpack change window globale object scope
398 Views Asked by Jameel At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in WEBPACK
- RequireJS shim config in webpack
- Webpack Uglify plugin returns "Killed" on Ubuntu
- Log to node console or debug during webpack build
- Gulp with WebPack. Which should be building my coffee/jade etc.?
- Webpack: silence output
- Webpack: Must i specify the domain in publicPath for url() directive to work in CSS?
- webpack-dev-server & jsxhint: const '$__0' has already been declared
- Use Webpack to split out a module so that it can be loaded in a WebWorker
- oclazyLoad with webpack to support lazy loading for Angularjs is not working on minification
- How to make webpack to produce only one file and include all chunks?
- Reduce transpiled code helpers with babel and webpack
- webpack sass compliation stuck, however same works with similar other file also same problamatic sass file works with gulp-sass module
- Webpack html-loader returns full module definition
- Webpack: Create a bundle with each file in directory
- Include paths for imports in babel using webpack
Related Questions in ES6-MODULE-LOADER
- is there any way to obtain a reference to (and use) an es6/2015 import in the same expression?
- Difference between simple import statement and System.import in ES6 Module Loader
- Initialization order for ES6 imports and angular controllers
- How to export default modules in index.js barrels
- Webpack change window globale object scope
- import a file name directly in ES6
- Which tools do I need in order to use ES6 style imports for my project using Gulp?
- Calling a method inside an IIFE exported method
- Javascript you may need an additional loader
- es6-module-loader cannot locate @angular/core in Angular 6
- How do I import @material/mwc-button without precompiling?
- Declaring functions using a require statement inside a Node.js class
- How to write an ES6 class\module that can be used by NodeJS & Aurelia
- Import a cert file as a string using webpack
- Can i init an Angular2 hybrid app without SystemJS?
Related Questions in ES6-MODULES
- How can I resolve a circular dependency between different ECMAScript modules?
- A guide on how to plug-in JS libraries like jQuery, Bootstrap etc
- "Unknown named module" error in react native
- Understanding ES6 modules with regards to Angular2 web application
- ES6 how to export all item from one file
- How to use es6 syntax to import a function module in Typescript
- How to export default modules in index.js barrels
- Webpack change window globale object scope
- How to solve the definition of dependences with lazy loading js module (file)?
- Output an ES module using webpack
- import module with global instance
- import a file name directly in ES6
- How can I import Jest?
- ESLint crawl ES6 modules
- React use outside functions as methods
Related Questions in JSENCRYPT
- Webpack change window globale object scope
- jsencrypt returns null decrypting string from encrypt function
- Why JSEncrypt encrypt password is different each time?
- Understanding JSEncrypt
- JSEncrypt encrypt but java cannot decrypt-BadPaddingException
- JSEncrypt decrypt on back-end (Bash)
- JS encrypt then decrypt it with PHP
- Javascript not decrypt, laravel RSA encrypted string
- [Nodejs - Crypto][JSencrypt] rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error
- How can I decrypt with my public key using JSEncrypt Or Store Private key on client browser using javascript
- export 'JSEncrypt' was not found in 'jsencrypt' in Angular
- ReferenceError: JSENCRYPT_VERSION is not defined after JSEncrypt 3.0.0
- when use jsencrypt.min.js encrypt and java decrypt throws exception
- Issue decrypting RSA public-key encrypted data by JS in C#
- JMeter - JsenEncrypt using Groovy so not to overload js load during each thread call for encryption
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can look at the various options available for shimming modules, specifically the
exports-loader.This will bind the global to a module scope and it won't be overwriteable outside of Webpack's runtime.