Comments (10)
@FlamesoFF maybe in some cases response
doesn't contain code
?
You can rewrite this like:
const code = response.match(/\?code=(.+)$/i);
if (!code[1]) {
return reject('No code');
}
return resolve(code[1]);
from terser-webpack-plugin.
@FlamesoFF in future please provide full stack of error, thanks
from terser-webpack-plugin.
@FlamesoFF problem in your code, after minification you get something like this:
"your-string-here".match(/\?code=(.+)$/i)[1]
And nothing in 1
index. Fix you code.
from terser-webpack-plugin.
@evilebottnawi I added full stack trace and also updated the string for you to understand better.
And nothing in 1 index. Fix you code.
I say again: it is working without minification. Read more carefully before answering, please.
from terser-webpack-plugin.
@FlamesoFF error not related to plugin
, it is related to your code
from terser-webpack-plugin.
We just wrapper around terser
and don't modify your code, just uglify using terser
from terser-webpack-plugin.
@evilebottnawi So I need to ask this question in terser
repository? Because my code stops working ONLY AFTER MINIFICATION.
from terser-webpack-plugin.
@FlamesoFF you just look on you mification code and find what is wrong, if you find what minification doesn't correctly you need create issue in terser
repo, if you continue oppressive communication i will ignore you.
Also you provide two lines of code and strange error identity.launchWebAuthFlow
(we don't use launchWebAuthFlow
in webpack) and it is looks what you written invalid code on your side.
from terser-webpack-plugin.
@evilebottnawi Okay, I'll create the issue there.
My communication has come to this form, because you didn't try to make sense of my issue and rushed to close it. That's not what I expected.
About identity.launchWebAuthFlow
, it's not invalid code: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity/launchWebAuthFlow
Following code is working without terser:
...
chrome.identity.launchWebAuthFlow({
interactive: true,
url
}, response => {
let code = response.match(/\?code=(.+)$/i)[1];
resolve(code);
});
...
from terser-webpack-plugin.
@evilebottnawi Ok, i'll try. Thank you for help anyway.
from terser-webpack-plugin.
Related Issues (20)
- ng build --dev heads to Error: Optimization error [main.fe9785e49a33b769.js]: SyntaxError: Unexpected token: punc ({) HOT 4
- ES2022 - terser can not handle syntax ( SyntaxError: Unexpected token: punc ({) ) HOT 3
- esbuild minify does not produce warnings HOT 3
- plugin running jest tests with maximum number of workers in Bitbucket Pipeline - causing exceeded memory limit errors HOT 4
- Format option "quote_keys" breaks private variable syntax HOT 1
- `nth_identifier` function that accesses global scope variable crashes HOT 8
- Worker is not a constructor HOT 2
- No documentation for MangleOptions HOT 1
- The type of Rules breaks HOT 3
- Bug: minified output causes a ReferenceError HOT 4
- When use esbuildMinify tree shaking is not effect HOT 3
- Allow terser-webpack-plugin to work with Node 18+ and webpack 4 default hashes without openssl-legacy-provider HOT 3
- Updater terser to 5.20.0 HOT 5
- Dont use workers for swc & esbuild minify HOT 1
- type error after upgrade from 5.2.0 to 5.3.9 HOT 1
- Source Map is inorrect when enable extractComments.banner of terser-webpack-plugin HOT 4
- Security issue with serialize-javascript dependency HOT 1
- Minifying moves await keyword inside inlined non-async function HOT 2
- Webpack config: After TypeScript type checking 6 errors appears. HOT 1
- Behavior of minified code is altered: when dependencies have imported JSON, JSON has names mangled, uncontrollable by terser mangle options 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 terser-webpack-plugin.