yabasha's avatar
Level 19

build npmjs plugin using laravel-mix

Hello,

I have developed nodejs module (simple one):

exports.printMsg = function() {
  console.log("jQuery version " + $().jquery);
  console.log("This is a message from the demo package");
}

When I build it using using laravel-mix and checked the console:

Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Module.<anonymous> (vendor.js:10620)
.
.
.

Any idea how can I make that plugin work.

Thanx,

0 likes
0 replies

Please or to participate in this conversation.