<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rob Chain</title>
    <description>The latest articles on DEV Community by Rob Chain (@r0bschuh).</description>
    <link>https://dev.to/r0bschuh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1608583%2F93f0b18d-36dc-45ce-9ea9-16cd6a7269f8.jpg</url>
      <title>DEV Community: Rob Chain</title>
      <link>https://dev.to/r0bschuh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/r0bschuh"/>
    <language>en</language>
    <item>
      <title>Strange error after build for PROD vite with laravel, vue3 and inertia</title>
      <dc:creator>Rob Chain</dc:creator>
      <pubDate>Mon, 23 Sep 2024 03:26:01 +0000</pubDate>
      <link>https://dev.to/r0bschuh/strange-error-after-build-for-prod-vite-with-laravel-vue3-and-inertia-1m1n</link>
      <guid>https://dev.to/r0bschuh/strange-error-after-build-for-prod-vite-with-laravel-vue3-and-inertia-1m1n</guid>
      <description>&lt;p&gt;Hi there, I am struggling with this issue for a couple of days already, I only get this error when I build for production, local environment works fine.&lt;br&gt;
This is the file generated by the build &lt;br&gt;
&lt;a href="https://justpaste.it/98pyw" rel="noopener noreferrer"&gt;https://justpaste.it/98pyw&lt;/a&gt;&lt;br&gt;
And this is the piece of code that fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (this instanceof a3) {
        return Reflect.construct(f2, arguments, this.constructor);
      }`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The error&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app-CQaiJHst.js:9445 Uncaught TypeError: Function has non-object prototype 'undefined' in instanceof check
    at [Symbol.hasInstance] (&amp;lt;anonymous&amp;gt;)
    at Function.a3 (app-CQaiJHst.js:9445:16)
    at app-CQaiJHst.js:9788:21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The vite.config file (for debugging purpose, I switched off minimized files) &lt;/p&gt;

&lt;p&gt;&lt;a href="https://playcode.io/2017607" rel="noopener noreferrer"&gt;https://playcode.io/2017607&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: paste the vite.config file here was a pain, that's why I add an external link with the code. &lt;/p&gt;

&lt;p&gt;Node version in prod and local environments (remote server and local v16.17.0 I already tried to upgrade and downgrade the node versions but I always got the same error/result)&lt;/p&gt;

&lt;p&gt;I also remove the node_modules many times reinstalling them, but nothing changes. I think the error is caused by vite when builds for production, but I have not clue how to fix it.&lt;/p&gt;

&lt;p&gt;Any clue?&lt;br&gt;
Thanks&lt;/p&gt;

</description>
      <category>vite</category>
    </item>
  </channel>
</rss>
