Context
Operator report, 2026-09-18: npm run build-all exits 1. The failing step is build-threads → dist/production → app worker:
ERROR in c2dbf450d3b9188847b7.html
c2dbf450d3b9188847b7.html from Terser plugin
`as` is not a supported option
DefaultsError: `as` is not a supported option
at defaults (node_modules/terser/dist/bundle.min.js:78:15)
...
at async renderEmbeddedSource (node_modules/minimizer-webpack-plugin/dist/minify.js:331:20)
at async askEmbeddedRenderer (node_modules/webpack/lib/util/dataURL.js:231:18)The Problem
- Trigger: #18815 (Dependabot, 2026-09-17) bumped webpack 5.110.3 → 5.111.0 and left the transitive
minimizer-webpack-plugin at 5.8.0 in package-lock.json.
- webpack 5.111.0 offers each inline
<script> body of an HTML asset to the embedded renderer with an as key: "script", "module" or "event-handler" (node_modules/webpack/lib/html/syntax.js, renderEmbeddedSource typedef).
minimizer-webpack-plugin 5.8.0 merges as into the terser options (dist/minify.js, renderEmbeddedSource), and terserMinify spreads those options into terser.minify (dist/utils.js, buildTerserOptions). Terser's option validation rejects the unknown key.
- 5.10.0 is the first release whose
buildTerserOptions takes as out of the options and maps it to module. webpack 5.111.0 declares "minimizer-webpack-plugin": "^5.7.0", so a lock that satisfies that range can still be one that 5.111.0 cannot work with.
- Only the app worker build hits this, because its graph is the only one that emits an HTML asset with an inline script.
apps/workstation/view/WorkspaceController.mjs openTopologyWorkspace() calls new URL('../index.html', import.meta.url) (since #18375), and apps/workstation/index.html has a classic inline <script>.
Reproducer. A minimal project outside the repo: the entry is new URL('./page.html', import.meta.url), the page has one classic inline <script>, and the build is mode: 'production', target: 'webworker', outputModule. Each row changes one variable:
| webpack |
minimizer-webpack-plugin |
result |
| 5.110.3 |
5.8.0 |
green |
| 5.111.0 |
5.8.0 |
red: `as` is not a supported option |
| 5.111.0 |
5.10.1 |
green, HTML output byte-identical to row 1 |
The Architectural Reality
- No config in
buildScripts/webpack/production/ sets optimization.minimizer, so production mode uses webpack's default minimizer (node_modules/webpack/lib/config/defaults.js, require("minimizer-webpack-plugin")). Because experiments.html defaults to "auto", that minimizer also minifies HTML assets and the scripts embedded in them.
- No CI job builds neo's own production threads. The only job that runs webpack in production mode,
consumer-runtime-build.yml's guard, did run on #18815 (package.json is in its paths) and passed. It compiles only the Data-worker and Main configs of a consumer fixture, never the app worker, and the app worker's graph is the only one with an inline-script HTML asset. That is why #18815 merged green. (Corrected 2026-09-18: this line first blamed the job's path filter, but the filter did not exclude #18815.)
The Fix
Refresh the transitive dependency in package-lock.json with npm update minimizer-webpack-plugin --package-lock-only, which resolves 5.10.1. The lock diff adds only four optional peerDependenciesMeta entries (@napi-rs/image, imagemin, sharp, svgo) and no new required dependency. No source or config change.
Acceptance Criteria
Out of Scope
- A CI observer for neo's production build on dependency PRs. This gap let #18815 merge green; adding one costs CI time on every dependency PR, so it is a separate decision.
- Reporting upstream that webpack 5.111.0's
^5.7.0 range admits minimizer versions that cannot consume the as key it now sends.
- Whether the Workstation popup URL resolves to a working page in
dist/production. The bundle points new URL at dist/production/<hash>.html, which is the source index.html with <script src=../../src/MicroLoader.mjs>, a source-layout path. The runtime behaviour is unmeasured, and it is a separate question from this build break.
Avoided Traps
- Reverting webpack to 5.110.3: discards a valid update, Dependabot proposes it again, and the stale transitive dependency stays.
optimization.minimizeOptions.html: false or experiments.html: false in the production configs: older webpack does not know these keys, and these configs also run in consumer workspaces (neoPath → node_modules/neo.mjs/) that bring their own webpack, which would fail schema validation. The change would also turn off HTML minification that worked before 5.111.
- An npm
overrides pin: the lock already pins what npm ci installs, and an override would add a second source of truth.
webpackIgnore on the new URL(): it would change what the popup URL means at runtime to fix a minifier version mismatch.
Related
- #18815 (trigger) · #18375 (introduced the HTML asset reference)
Live latest-open sweep: checked the latest 20 open issues at 2026-09-18T09:11:20Z, and no equivalent was found. A2A in-flight sweep: no claim touches webpack, the minimizer or the lockfile. Memory Core sweep: no prior decision. Own-assigned sweep: no issue on the same surface.
Retrieval Hint: "webpack 5.111 minimizer-webpack-plugin as is not a supported option production app worker"
Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59
Context
Operator report, 2026-09-18:
npm run build-allexits 1. The failing step isbuild-threads→dist/production→ app worker:ERROR in c2dbf450d3b9188847b7.html c2dbf450d3b9188847b7.html from Terser plugin `as` is not a supported option DefaultsError: `as` is not a supported option at defaults (node_modules/terser/dist/bundle.min.js:78:15) ... at async renderEmbeddedSource (node_modules/minimizer-webpack-plugin/dist/minify.js:331:20) at async askEmbeddedRenderer (node_modules/webpack/lib/util/dataURL.js:231:18)The Problem
minimizer-webpack-pluginat 5.8.0 inpackage-lock.json.<script>body of an HTML asset to the embedded renderer with anaskey:"script","module"or"event-handler"(node_modules/webpack/lib/html/syntax.js,renderEmbeddedSourcetypedef).minimizer-webpack-plugin5.8.0 mergesasinto the terser options (dist/minify.js,renderEmbeddedSource), andterserMinifyspreads those options intoterser.minify(dist/utils.js,buildTerserOptions). Terser's option validation rejects the unknown key.buildTerserOptionstakesasout of the options and maps it tomodule. webpack 5.111.0 declares"minimizer-webpack-plugin": "^5.7.0", so a lock that satisfies that range can still be one that 5.111.0 cannot work with.apps/workstation/view/WorkspaceController.mjsopenTopologyWorkspace()callsnew URL('../index.html', import.meta.url)(since #18375), andapps/workstation/index.htmlhas a classic inline<script>.Reproducer. A minimal project outside the repo: the entry is
new URL('./page.html', import.meta.url), the page has one classic inline<script>, and the build ismode: 'production',target: 'webworker',outputModule. Each row changes one variable:`as` is not a supported optionThe Architectural Reality
buildScripts/webpack/production/setsoptimization.minimizer, so production mode uses webpack's default minimizer (node_modules/webpack/lib/config/defaults.js,require("minimizer-webpack-plugin")). Becauseexperiments.htmldefaults to"auto", that minimizer also minifies HTML assets and the scripts embedded in them.consumer-runtime-build.yml'sguard, did run on #18815 (package.jsonis in itspaths) and passed. It compiles only the Data-worker and Main configs of a consumer fixture, never the app worker, and the app worker's graph is the only one with an inline-script HTML asset. That is why #18815 merged green. (Corrected 2026-09-18: this line first blamed the job's path filter, but the filter did not exclude #18815.)The Fix
Refresh the transitive dependency in
package-lock.jsonwithnpm update minimizer-webpack-plugin --package-lock-only, which resolves 5.10.1. The lock diff adds only four optionalpeerDependenciesMetaentries (@napi-rs/image,imagemin,sharp,svgo) and no new required dependency. No source or config change.Acceptance Criteria
package-lock.jsonresolvesnode_modules/minimizer-webpack-pluginto ≥ 5.10.0, and no other package changes version.npm run build-threads -- -n -e prod -t appexits 0. The same command on the pre-fix lock, at the same head, reproduces theaserror.npm run build-threads -- -n -e prod -t allexits 0 on the PR head.npm installlocally,npm run build-allexits 0.Out of Scope
^5.7.0range admits minimizer versions that cannot consume theaskey it now sends.dist/production. The bundle pointsnew URLatdist/production/<hash>.html, which is the sourceindex.htmlwith<script src=../../src/MicroLoader.mjs>, a source-layout path. The runtime behaviour is unmeasured, and it is a separate question from this build break.Avoided Traps
optimization.minimizeOptions.html: falseorexperiments.html: falsein the production configs: older webpack does not know these keys, and these configs also run in consumer workspaces (neoPath→node_modules/neo.mjs/) that bring their own webpack, which would fail schema validation. The change would also turn off HTML minification that worked before 5.111.overridespin: the lock already pins whatnpm ciinstalls, and an override would add a second source of truth.webpackIgnoreon thenew URL(): it would change what the popup URL means at runtime to fix a minifier version mismatch.Related
Live latest-open sweep: checked the latest 20 open issues at 2026-09-18T09:11:20Z, and no equivalent was found. A2A in-flight sweep: no claim touches webpack, the minimizer or the lockfile. Memory Core sweep: no prior decision. Own-assigned sweep: no issue on the same surface.
Retrieval Hint: "webpack 5.111 minimizer-webpack-plugin as is not a supported option production app worker"
Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59