Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled rejection SyntaxError: unknown: static is a reserved word in strict mode #85

Closed
djnaumov opened this issue Nov 17, 2017 · 1 comment

Comments

@djnaumov
Copy link

I got issue when I tried check-up your plugin.

So, I added this code in webpack.common.js

const WebpackMonitor = require('webpack-monitor');

// ...

plugins: [
  new WebpackMonitor({
    capture: true, // -> default 'true'
    target: '../monitor/myStatsStore.json', // default -> '../monitor/stats.json'
    launch: true, // -> default 'false'
    port: 3030, // default -> 8081
  }),
], 

then I run command npm start, I got error

Unhandled rejection SyntaxError: unknown: static is a reserved word in strict mode (109308:16)
  109306 |         function renderColorMask(input, buffer, caretPos) {
  109307 |             function handleStatic() {
> 109308 |                 static || null !== test.fn && void 0 !== testPos.input ? static && null !== test.fn && void 0 !== testPos.input && (static = !1,
         |                 ^
  109309 |                 maskTemplate += "</span>") : (static = !0, maskTemplate += "<span class='im-static''>");
  109310 |             }
  109311 |             if (void 0 !== colorMask) {
node v8.9.1
"webpack": "^3.8.1",
"webpack-dev-middleware": "^1.12.0",
"webpack-dev-server": "^2.9.4",
"webpack-md5-hash": "^0.0.5",
"webpack-merge": "^4.1.1",
"webpack-monitor": "^1.0.13"
@mbehzad
Copy link
Contributor

mbehzad commented Nov 28, 2017

Hi @djnaumov, i think the issue is in the Inputmask library code that you pasted. and not from the webpack-monitor. The usage of the reserved word was fixed in a PR.
you may want to update to a later version >v3.3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants