<?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: Chris Shaffer</title>
    <description>The latest articles on DEV Community by Chris Shaffer (@methodbox).</description>
    <link>https://dev.to/methodbox</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%2F193300%2F0651603b-c232-41c5-bef8-bc3f7ae3ff79.jpeg</url>
      <title>DEV Community: Chris Shaffer</title>
      <link>https://dev.to/methodbox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/methodbox"/>
    <language>en</language>
    <item>
      <title>Webpack Remote Development?</title>
      <dc:creator>Chris Shaffer</dc:creator>
      <pubDate>Thu, 19 Dec 2019 16:19:30 +0000</pubDate>
      <link>https://dev.to/methodbox/webpack-remote-development-1i2c</link>
      <guid>https://dev.to/methodbox/webpack-remote-development-1i2c</guid>
      <description>&lt;p&gt;I didn't want my first post on Dev.to to be a question, but it seems to be the best place I've found to answer many other questions, so here goes.&lt;/p&gt;

&lt;p&gt;I'm working on an app that requires I access an iframe; this means due to &lt;code&gt;same-origin&lt;/code&gt; policy it would be awesome if I could do remote dev on the server providing the iframe so the origin is the same.&lt;/p&gt;

&lt;p&gt;Right now, I'm running a build, uploading it to the test server, then messing with testing with the iframe in the browser console.&lt;/p&gt;

&lt;p&gt;I'm wondering if anyone has had any success and can provide specific guidance on configuring Webpack to work with Nginx on a &lt;em&gt;non-web root&lt;/em&gt; URL (i.e domain.com/testing).&lt;/p&gt;

&lt;p&gt;I can get webpack to run, and I have a proxy_pass in Nginx successfully serving the page, however Webpack refuses to serve the app (Cannot GET /testing).&lt;/p&gt;

&lt;p&gt;I've tried various configurations of the &lt;code&gt;publicPath&lt;/code&gt;, &lt;code&gt;public&lt;/code&gt; and &lt;code&gt;contentBase&lt;/code&gt; settings, but Webpack simply can't figure out that I'm not at the web root. The console shows 404s for various scripts looking at &lt;code&gt;/&lt;/code&gt; instead of &lt;code&gt;/testing&lt;/code&gt;. None of this changes with the various &lt;code&gt;devServer&lt;/code&gt; configs.&lt;/p&gt;

&lt;p&gt;Any help would be greatly appreciated.&lt;/p&gt;

</description>
      <category>webpack</category>
      <category>question</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
