config/webpack.prod.config.js
// helpful for generating path-specific prod configs for tools
helpful for generating path-specific prod configs for tools
helpful for generating path - specific prod configs for tools
function prodConfigGenerator(basedir, toolName) {
  return {
    output: {
      path: path.join(basedir, 'server', 'static', 'gen', toolName),
      publicPath: `/static/gen/${toolName}/`,
      filename: '[name].[chunkhash:8].js',
      chunkFilename: '[id].[chunkhash:8].chunk.js',
    },
    plugins: [
      new ManifestRevisionPlugin(
        path.resolve(basedir, 'server', 'static', 'gen', toolName, 'manifest.json'),
        { rootAssetPath: './src', 
          ignorePaths: [/.*\.DS_Store/], 
        },
      ),
    ],
  };
}
function prodConfigGenerator ( basedir , toolName ) { return { output : { path : path . join ( basedir , 'server' , 'static' , 'gen' , toolName ) , publicPath : ` ${ toolName } ` , filename : '[name].[chunkhash:8].js' , chunkFilename : '[id].[chunkhash:8].chunk.js' , } , plugins : [ new ManifestRevisionPlugin ( path . resolve ( basedir , 'server' , 'static' , 'gen' , toolName , 'manifest.json' ) , { rootAssetPath : './src' , ignorePaths : [ / .*\.DS_Store / ] , } , ) , ] , } ; }
helpful for generating path-specific prod configs for tools
helpful for generating path - specific prod configs for tools
// configure the build output files to a custom place so we can check them in // build a manifest.json for our Flask server to read, pointing at all the files // Create the manifest file that Flask and other frameworks use. // important that this be relative, not absolute // need to manually ignore the .DS_Store files generated on OSX