# Creating custom component need to pass assets path

**URL:** <https://community.weweb.io/t/creating-custom-component-need-to-pass-assets-path/16690>\
**Category:** Ask us anything\
**Tags:** custom-components, weweb\
**Created:** [February 20, 2025, 12:02pm UTC](https://community.weweb.io/t/creating-custom-component-need-to-pass-assets-path/16690 "2025-02-20T12:02:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehasharma](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@nehasharma](https://community.weweb.io/u/nehasharma)\
**Post date:** [February 20, 2025, 12:02pm UTC](https://community.weweb.io/t/creating-custom-component-need-to-pass-assets-path/16690/1 "2025-02-20T12:02:52Z")

</div>

try to use third party plugin in custom code

code for wwSection.vue:

```auto
<template>
  <div class="my-section" id="app">
    <WebViewer :path="`${publicPath}`" url="https://pdftron.s3.amazonaws.com/downloads/pl/webviewer-demo.pdf"/>
  </div>
</template>

<script>
import WebViewer from './components/WebViewer.vue'

export default {
  name: 'app',
  components: {
    WebViewer
  },
  data () {
    return {
      publicPath: `/public/pdfjsexpress/`
    }
    
  }
}
</script>

<style lang="scss" scoped>
.my-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 200px;
  h1 {
    font-size: 32px;
  }
  p {
    margin-top: 12px;
  }
}
</style>

```

ww-config.js

```auto
export default {
  editor: {
    label: {
      en: "PDF Viewer",
    },
  },
  properties: {
    pdfUrl: {
      label: {
        en: "PDF URL",
      },
      type: "String",
      defaultValue: "",
    },
  }
};

```

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [February 20, 2025, 6:22pm UTC](https://community.weweb.io/t/creating-custom-component-need-to-pass-assets-path/16690/2 "2025-02-20T18:22:08Z")

</div>

What?

---

<div class="post-metadata">

**Author:** ![nehasharma](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@nehasharma](https://community.weweb.io/u/nehasharma)\
**Post date:** [February 22, 2025, 2:32pm UTC](https://community.weweb.io/t/creating-custom-component-need-to-pass-assets-path/16690/3 "2025-02-22T14:32:10Z")

</div>

**Subject:** Unable to Load PDF Viewer from `dist` Folder in WeWeb

I’m trying to load a PDF viewer library from my `dist` folder, but I’m unable to pass the correct path. When attempting to access the viewer, I receive the following error:

> **[dashboard.weweb.io](http://dashboard.weweb.io) refused to connect.**  
> [Vue Router warn]: No match found for location with path `/dist/public/pdfjsexpress/ui/index.html`

Additionally, in the network tab, the request to:  
`https://editor-dev.weweb.io/dist/public/pdfjsexpress/ui/index.html`  
returns **200 OK** , but the response says:  
_“We’re sorry but ww-test doesn’t work properly without JavaScript enabled. Please enable it to continue.”_

Could you please help me resolve this issue? I suspect it might be related to routing or security restrictions in WeWeb. Let me know if I need to adjust my project settings to properly load static files from the `dist` folder.
