Giter Club home page Giter Club logo

Comments (5)

alexander-akait avatar alexander-akait commented on June 15, 2024 6

@david-polak because exclude option use processed assets (not sources). It is impossible exclude source modules.

from terser-webpack-plugin.

alexander-akait avatar alexander-akait commented on June 15, 2024 3

@david-polak it is impossible. Why? Because webpack bundle your modules in chunks (js files) and when pass their through minificator. If you find bug in minimicator (i.e. terser) better to create issue in https://github.com/terser-js/terser. Why minification don't uses on modules - it is inefficient.

from terser-webpack-plugin.

alexander-akait avatar alexander-akait commented on June 15, 2024 2

@nullromo You can't disable minification for some modules, if you need it you can open an issue in terser repo about:

/*! terser-ignore-start */
// ... code
/*! terser-ignore-end */

from terser-webpack-plugin.

nullromo avatar nullromo commented on June 15, 2024 1

I am running into the same issue. @evilebottnawi When I run webpack with minification turned off, my code works. When I run it with minification on, it doesn't. For this reason, I want to be able to turn off minification for only those modules which Terser breaks.

from terser-webpack-plugin.

david-polak avatar david-polak commented on June 15, 2024

@evilebottnawi is there a way to exclude sources? I am building an app that outputs HTML+JavaScript files and Terser mangles my template JS files badly, until now I've been 'solving' the issue by not minimizing my code at all.

from terser-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.