# Lit Element no longer reactive after Hugo upgrade

**URL:** <https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094>\
**Category:** support\
**Created:** [February 11, 2022, 4:17am UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094 "2022-02-11T04:17:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timbomckay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/timbomckay/32/16231_2.png) [@timbomckay](https://discourse.gohugo.io/u/timbomckay)\
**Post date:** [February 11, 2022, 4:17am UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094/1 "2022-02-11T04:17:35Z")

</div>

I have a Hugo site that uses Lit for performant web components. As of Hugo version 0.89.3 everything was working well. My github action config didn’t specify a version and broke when it tried to use 0.91.0, though I hadn’t pushed any updates for a couple weeks and it may have broke in a version in between and hardcoded to my local version for the time being. According to version [0.90.0](https://github.com/gohugoio/hugo/releases/tag/v0.90.0) esbuild was upgraded from v0.13.12 =\> v0.14.2. I just upgraded Hugo locally via homebrew and I can’t figure out what’s changed or how to resolve it. I also can’t figure out how to downgrade as homebrew apparently makes that much more difficult than NPM.

I’ve also taken [this example](https://lit.dev/playground/#sample=examples/full-component) from Lit’s playground which shows the reactivity working as expected in their example but when I click the element in my updated Hugo site it doesn’t update. So it’s not my code but something with the configuration. I’m not sure if there’s something I’m missing from my tsconfig or if I need to pass something to the esbuild.

Here’s my updated tsconfig but these changes aren’t helping either.

```json
{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": true,
    "declarationMap": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "inlineSources": true,
    "lib": ["es2020", "DOM", "DOM.Iterable"],
    "module": "es2020",
    "moduleResolution": "node",
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": true,
    "noImplicitOverride": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "outDir": "./",
    "rootDir": "./assets",
    "sourceMap": true,
    "strict": true,
    "target": "es2019",
    "useDefineForClassFields": false,
    "plugins": [
      {
        "name": "ts-lit-plugin",
        "strict": true
      }
    ]
  },
  "include": ["assets/**/*.ts"],
  "exclude": []
}

```

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![timbomckay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/timbomckay/32/16231_2.png) [@timbomckay](https://discourse.gohugo.io/u/timbomckay)\
**Post date:** [February 11, 2022, 5:33am UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094/2 "2022-02-11T05:33:57Z")

</div>

It looks like after much research I thought I’d try passing the target as Hugo describes in their documentation like so:

```auto
{{ $opts := dict "target" "es2019" }}
{{ $script := resources.Get "index.ts" | js.Build $opts }}

```

Things seem to be working again.

So does esbuild/hugo not see my tsconfig file? Do I need to pass that as a separate option to make it known? According to esbuild’s documentation it should be finding it. Doesn’t seem to be the case here though.

---

<div class="post-metadata">

**Author:** ![lschierer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lschierer/32/16221_2.png) [@lschierer](https://discourse.gohugo.io/u/lschierer)\
**Post date:** [July 9, 2023, 6:09pm UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094/3 "2023-07-09T18:09:45Z")

</div>

I am hitting a related issue, after upgrading from 0.113 to 0.115.2, I started getting compile errors on some lit components that had previously worked fine. In [11232](https://github.com/gohugoio/hugo/issues/11232) I reported what looked to me like regression and was told that I need to set

```auto
    "experimentalDecorators": true,

```

but that is already in my tsconfig, indicating that file is not being used. I would also like to know how to get the tsconfig file to be used by the js.Build rather than try to keep two configs.

Thanks!!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 9, 2023, 6:21pm UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094/4 "2023-07-09T18:21:24Z")

</div>

We’ll handle this in the issue queue.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 9, 2023, 6:22pm UTC](https://discourse.gohugo.io/t/lit-element-no-longer-reactive-after-hugo-upgrade/37094/5 "2023-07-09T18:22:16Z")

</div>


