const webpackConfig = require('./webpack.config');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
var originalConfig = webpackConfig({});

module.exports = () => {
  let config = originalConfig;
  // output files without hashes
  config.output.filename = '[name].bundle.js';
  config.plugins.splice(config.plugins.indexOf(HtmlWebpackPlugin));
  config.plugins = [
    // first clean the output directory
    new CleanWebpackPlugin([config.output.path]),
    ...config.plugins
  ];

  return config;
};

@@ -162,16 +162,75 @@
 ugin');%0A
+const project = require('./aurelia_project/aurelia.json');%0A
 var orig
@@ -466,16 +466,364 @@
 ugin));%0A
+  // fix output path for .net core development%0A  config.module.rules = config.module.rules.map(x =%3E %7B%0A    if (x.loader && (x.loader === 'url-loader' %7C%7C x.loader === 'file-loader')) %7B%0A      if (!x.options) %7B%0A        x.options = %7B%7D;%0A      %7D%0A      x.options.publicPath = project.platform.output.replace('wwwroot', '') + '/';%0A    %7D%0A    return x;%0A  %7D);%0A
   config

update configuration to set public path for static resources The webpack build moves files into the /dist/ folder and resources are loaded from the root '/' publicPath This adds a change to the webpack.netcore.config.js file that customizes webpack to work with javascript services by adding the publicPath to the url and file loaders.