Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

How to integrate javascript-obfuscator / webpack-obfuscator into an ionic 4 app

$
0
0

I am new to configuring webpack and I am trying to integrate my ionic 4 app with the javascript-obfuscator / webpack-obfuscator. I would like to know how to integrate it. I have tried the following configurations but none of them works.

module.exports = (config, options) => {

config.plugins.push(new JavaScriptObfuscator({

  rotateStringArray: true, // please customizable with options

}, ['exclude_bundle.js']));

}

/* ‘use strict’;

const JavaScriptObfuscator = require(‘webpack-obfuscator’);

module.exports = {

entry: {

    'abc': 'index.js',

    //'cde': './test/input/index1.js'

},

output: {

    path: '/www',

    filename: '[name].js' // output: abc.js, cde.js

},

plugins: [

    new JavaScriptObfuscator({

        rotateStringArray: true

    }, ['abc.js'])

]

}; */

/* var WebpackObfuscator = require(‘webpack-obfuscator’);

// webpack loader rules array

rules: [

{

    test: /\.js$/,

    exclude: [

        path.resolve(__dirname, 'excluded_file_name.js')

    ],

    enforce: 'post',

    use: {

        loader: WebpackObfuscator.loader,

        options: {

            rotateStringArray: true

        }

    }

}

] */

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>