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

es5-bundled | SyntaxError: Cannot use 'import.meta' outside a module #600

Closed
ranjeet-choudhary opened this issue Jul 22, 2018 · 10 comments
Closed
Labels

Comments

@ranjeet-choudhary
Copy link

"polymer-cli": "^1.7.7",
getting the below error on Opera 54 with es5-bundled.
esm-bundled works fine.

image

@swapkats
Copy link

I'm having the same issue, any update on this?

@ranjeet-choudhary
Copy link
Author

@swapkats it looks like bable minify issue babel/minify#850, which fails in es5 bundle causes this.
Until the fix is available, disabling minify fixes the issue

{
"name": "es5-bundled",
"js": {
"compile": "es5",
"minify": false,
"transformModulesToAmd": true
},
"css": {
"minify": true
},
"html": {
"minify": true
},
"bundle": true,
"addServiceWorker": true
}

@swapkats
Copy link

@ranjeet-choudhary thanks for pointing out. I'm using esm-bundled as you said till it's fixed, seems to work fine.

@HeratPatel
Copy link

hey any updates on this issue
it is working with minify option false
but that is not good for performance

@andrewebdev
Copy link

Doesn't work for me, even with minify false. I still get this error

@bmargula
Copy link

Same here, what is a workaround? import.meta shouldn't even be in a ES5 compliant bundle

@busynest
Copy link

you are all missing a package. just reinstall.

@kkovach
Copy link

kkovach commented Mar 29, 2019

I was not missing anything. I followed @ranjeet-choudhary instructions above and got it working.

tanbt pushed a commit to tanbt/PolymerPractice that referenced this issue Mar 29, 2019
@stale
Copy link

stale bot commented Mar 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 28, 2020
@stale
Copy link

stale bot commented Apr 21, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants