CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Sometimes losing ES6 Bundle format settings

Open machernator opened this issue 3 years ago • 2 comments

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

machernator avatar Jun 20 '22 11:06 machernator

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.

bdkjones avatar Jun 20 '22 19:06 bdkjones

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.

machernator avatar Jun 21 '22 08:06 machernator