# Webpack 5 + yarn 3 workspaces + typescript

**URL:** https://discourse.aurelia.io/t/webpack-5-yarn-3-workspaces-typescript/5029
**Category:** Help Requests
**Created:** [December 28, 2022, 10:25pm UTC](https://discourse.aurelia.io/t/webpack-5-yarn-3-workspaces-typescript/5029 "2022-12-28T22:25:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elitemike](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitemike/32/690_2.png) [@elitemike](https://discourse.aurelia.io/u/elitemike)
#### Post date: [December 28, 2022, 10:25pm UTC](https://discourse.aurelia.io/t/webpack-5-yarn-3-workspaces-typescript/5029/1 "2022-12-28T22:25:21Z")

</div>

I am finally attempting to update my projects to some of the later versions of tools. I thought I had this working, but sure enough there are hiccups.

In the current state of this repo, [GitHub - elitemike/aurelia-test-app](https://github.com/elitemike/aurelia-test-app) I can’t import a plugin.  
Commenting out `aurelia.use.plugin(PLATFORM.moduleName('@packages/dep1'));` on the test-app’s main.ts will allow the application to work

I believe the project structure is setup correct, but I’m sure it’s a webpack issue where it isn’t resolving the module correctly.

I also can’t get vs code debugging to work. PLEASE HELP

---

<div class="post-metadata">

### Author: ![TomorrowToday](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/tomorrowtoday/32/2343_2.png) [@TomorrowToday](https://discourse.aurelia.io/u/TomorrowToday)
#### Post date: [December 29, 2022, 2:03am UTC](https://discourse.aurelia.io/t/webpack-5-yarn-3-workspaces-typescript/5029/2 "2022-12-29T02:03:51Z")

</div>

You may need to create an alias in the webpack config

---

<div class="post-metadata">

### Author: ![elitemike](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitemike/32/690_2.png) [@elitemike](https://discourse.aurelia.io/u/elitemike)
#### Post date: [December 29, 2022, 8:30pm UTC](https://discourse.aurelia.io/t/webpack-5-yarn-3-workspaces-typescript/5029/3 "2022-12-29T20:30:44Z")

</div>

Update, it works! I had to set `esModule: false` on the HTML loader

Now i need to figure out why my command runners don’t want to work to watch the package changes

I had a mistake where I wasn’t actually importing the view on the viewmodel class inline. That causes the site to get further. What I’m running into now seems like a bundling issue for sure.

```auto
Uncaught (in promise) Error: Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template>

```

If I set a breakpoint on this function in aurelia-pal-browser, I can see that the markup is the module with the template residing on the ‘default’ property.

```auto
 createTemplateFromMarkup: function createTemplateFromMarkup(markup) {
    var parser = document.createElement('div');
    parser.innerHTML = markup;

    var temp = parser.firstElementChild;
    if (!temp || temp.nodeName !== 'TEMPLATE') {
      throw new Error('Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template>');
    }

    return _FEATURE.ensureHTMLTemplateElement(temp);
  }

```

I have a working sample setup using Dumber, I’m just not sure if I want to spend the time to fix my production code. I may not have a choice
