Skip to content

Fix build to use a defined global object ("this" instead of "self")#505

Open
chpio wants to merge 3 commits intokiprotect:masterfrom
chpio:master
Open

Fix build to use a defined global object ("this" instead of "self")#505
chpio wants to merge 3 commits intokiprotect:masterfrom
chpio:master

Conversation

@chpio
Copy link

@chpio chpio commented Apr 12, 2024

Hi,
this changes one Webpack option, that makes it build with tools like Vite.

The globalObject option is set to "this", as "self" is not defined.

@kemenaran
Copy link

Being able to build with Vite.js would be great!

Currently the documented syntax fails:

import * as klaro from 'klaro/dist/klaro.js';
# Error: with Vite.js, 'klaro' is the string "Module", instead of the root klaro object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants