Comments (5)
@kettanaito sorry, you are right, you have valid config, i reopen issue, but seems it is not related to plugin, we just pass option to babel
using babel-preset-minify
from babel-minify-webpack-plugin.
@evilebottnawi thanks!
Let's address the respective repository then, it seems things are broken. Do you mind doing so? If not, please just direct me what is a proper place to ask.
Regardless, what do you think about adding at least one real-world example to this repo? That would help a lot, from my experience.
from babel-minify-webpack-plugin.
@kettanaito Thanks for issue, you just use invalid configuration - use minifyOptions: { ... }
for mangle
option, see https://github.com/webpack-contrib/babel-minify-webpack-plugin#pluginopts
from babel-minify-webpack-plugin.
@evilebottnawi thanks for the reply!
TL;DR
Please show me a missing example of how to provide these options using BabelMinifyPlugin. Thanks.
Long version
To be honest, I would like to see at least one working example. Even what you've posted right now doesn't make much sense to me:
Here's how to use the plugin from its README:
new MinifyPlugin(minifyOpts, pluginOpts)
How I'm using it:
new MinifyPlugin({
removeConsole: true,
mangle: { ... }
})
You suggest I should use minifyOptions
, which I do - that's the Object which the plugin accepts as the first argument, isn't it?
removeConsole
and removeDebugger
, which are minifyOptions
, if I get it correctly, work properly when passed as I am passing them. That makes it valid to assume the first Object is a minifyOptions
.
Please, could you clarify this? It feels like there's no clear explanation how to pass those options.
Thanks.
P.S. I would be only glad to add the proper example of usage myself as a pull request, only explain it to me please.
from babel-minify-webpack-plugin.
@kettanaito agree, PR welcome, many work right now
from babel-minify-webpack-plugin.
Related Issues (20)
- Unusable release on npm HOT 3
- invalid option topLevel HOT 1
- Newest version not available via NPM / Yarn HOT 1
- Uncaught TypeError: Class constructor cannot be invoked without 'new' [bug] HOT 1
- Update packge.json to support babel-core@7-beta HOT 9
- In README it is said “falsy value to remove all comments”. Not quite true HOT 2
- error with sourcemaps HOT 35
- UnhandledPromiseRejectionWarning when building HOT 2
- Improve the minification speed HOT 1
- named functions excluded HOT 1
- Problem in strict-mode with ejs-templates HOT 1
- A joined array of ES6 template literals is minfied uncorrectly HOT 1
- breaks bundling HOT 1
- "parallel" options to leverage multiple cores [feature request]
- Error: original.line and original.column are not numbers HOT 2
- Babel 7 Support HOT 13
- Banner comment is removed
- Js heap out of memory HOT 6
- Configuration with react HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-minify-webpack-plugin.