Skip to content

Naja + ublaboo/datagrid + webpack #203

Answered by jiripudil
Zrnik asked this question in Support
Discussion options

You must be logged in to vote

Hello, you're not the first to encounter this kind of issue. Unfortunately, datagrid's assets are not so ready to be used as ES modules comfortably. In one of the threads on Nette forum, @f3l1x mentioned that they have plans to alleviate this. I've opened contributte/datagrid#942 to keep track of the progress.

As for a solution until then, one which I believe is most likely to work is to use the ProvidePlugin, configured to expose naja's default export:

new webpack.ProvidePlugin({
	naja: ['naja', 'default'],
});

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Zrnik
Comment options

You must be logged in to vote
1 reply
@jiripudil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants