Skip to content

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

Open
chpio wants to merge 3 commits into
kiprotect:masterfrom
chpio:master
Open

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

Conversation

@chpio

@chpio chpio commented Apr 12, 2024

Copy link
Copy Markdown

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
Copy Markdown

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