Skip to content

Instantly share code, notes, and snippets.

@plfort
Created January 5, 2018 08:22
Show Gist options
  • Save plfort/93da0ee1465f1d7f929fe5d9e6307532 to your computer and use it in GitHub Desktop.
Save plfort/93da0ee1465f1d7f929fe5d9e6307532 to your computer and use it in GitHub Desktop.

Revisions

  1. plfort created this gist Jan 5, 2018.
    15 changes: 15 additions & 0 deletions webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    ...
    let config = Encore.getWebpackConfig();
    if(!Encore.isProduction()) {
    fs.writeFile("fakewebpack.config.js", "module.exports = "+JSON.stringify(config), function(err) {
    if(err) {
    return console.log(err);
    }
    console.log("fakewebpack.config.js written");
    });
    }


    module.exports = config;

    // Then in PhpStorm webpack settings, point to the fakewebpack.config.js file