Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

I want to ignore libs folder from minimizer while using webextension-toolbox.config.js

$
0
0

Here is the code that I am using to customize the webpack config.I tried multiple ways to ignore libs from minimizer but I am unable to skip them by using plugins.

Here is the output of the build process

// This file is not going through babel transformation.// So, we write it in vanilla JS// (But you could use ES2015 features supported by your Node.js version)const { resolve } = require('path')const GlobEntriesPlugin = require('webpack-watched-glob-entries-plugin')// const CopyPlugin = require("copy-webpack-plugin");module.exports = {    webpack: (config, { dev, vendor, copyIgnore }) => {        // Perform customizations to webpack config        console.log("Config: ", JSON.stringify(config.module.rules));        // console.log("Config: ", config.module.rules[1].toString());        // config.module.noParse = /notCompileScripts\/some-dir/        // config.module.noParse = /libs/        config.module.rules.push({            test: /\.css$/i,            use: ["style-loader", "css-loader"],        });        config.entry = GlobEntriesPlugin.getEntries(            [                // resolve('app', '*.js'),                resolve('app', '?(scripts)/**/*.js'),                resolve('app', '?(styles/**/*.css)'),                // resolve('app', '?(libs)/*.js')            ],            // {            //     ignore: 'libs/*.js'            // }        )        // console.log("copyIgnore: ", copyIgnore);        // console.log("dev: ", dev);        // console.log("vendor: ", vendor);        // config.plugins.push(        //     new CopyPlugin({        //         patterns: [        //             { from: "libs", to: "libs", info: { minimized: false } }        //         ]        //     })        // );        // Important: return the modified config        // console.log("Config: ", JSON.stringify(config));        return config    },    copyIgnore: ['scripts/*.js', 'scripts/**/*.js', '**/*.json']}

Viewing all articles
Browse latest Browse all 5049

Trending Articles



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