Skip to content

Error when using 2 vue based webcomponent libraries on the same page #1150

Closed
@batje

Description

@batje

Version

3.0.0-beta.6

Reproduction link

https://github.com/batje/twocomponents

Steps to reproduce

  • run npm install in the /component1 subfolder
  • open the 'working.html' and 'failing.html' in your browser

The error will happing in the file failing.html (see your console)

What is expected?

If I have 2 webcomponent libraries with separate compiles, they should both work.

What is actually happening?

the second webcomponent generates an error and is invisible, because the first webpack_require instance is queried.


By adding the output.library option to the webpack config, each webcomponent library gets its own namespace.

This is implemented in component3 in the vue,config.js file , but should be standard, imho.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions