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

Sometimes losing ES6 Bundle format settings #693

Open
machernator opened this issue Jun 20, 2022 · 2 comments
Open

Sometimes losing ES6 Bundle format settings #693

machernator opened this issue Jun 20, 2022 · 2 comments

Comments

@machernator
Copy link

machernator commented Jun 20, 2022

Quick, short summary:

When setting ES6 bundle format for a js file with imprts to IIFE, the setting gets someimes lost. The setting reverts to "Do not bundle ES6 modules"

Expected results:
Bundling the js file and its import into IIFE.

Actual results:
The browser produces a JS Error: Uncaught SyntaxError: Cannot use import statement outside a module (at filename.min.js:1:3494) -> makes sense, because I do not have a module declared.

Exact steps to reproduce:

Hard to say, because I cannot say when the setting is lost. Create a JS file, import a module, set ES6 bundle format to IIFE. Change and save often.

A link to download a simplified project or file that shows the issue:

Your configuration (any details about your system that you think might be relevant)
ES6 bundle format -> IIFE

Minify output with Terser: always

Create source map: always

@bdkjones
Copy link
Owner

Are you branch-switching in Git? The most common cause of "settings randomly change on me" is switching git branches to a different version of the CodeKit config file.

@machernator
Copy link
Author

machernator commented Jun 21, 2022

Yes, I am switching branches often, but I git-ignore config.codekit3 in my projects. But thanks for the hint, I will watch out for branch switches.

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