Compare commits

..

No commits in common. "c05fd94028d6023b3d4debf0c1d2bece2c547df5" and "9e136fa1b390731536f9888d17c6ce9b911f43c8" have entirely different histories.

2 changed files with 2 additions and 8 deletions

View File

@ -48,7 +48,6 @@ let
name, name,
src, src,
nodePackages ? null, nodePackages ? null,
routes ? [ "/" ],
}: }:
let let
nodeSource = symlinkJoin { nodeSource = symlinkJoin {
@ -57,12 +56,6 @@ let
builderPkg.lib builderPkg.lib
] ++ (if nodePackages != null then [ nodePackages ] else [ ]); ] ++ (if nodePackages != null then [ nodePackages ] else [ ]);
}; };
baseWebpackConfig = builtins.readFile ./webpack.config.js;
webpackConfig = ''
const ROUTES = ${builtins.toJSON routes}
'' + "\n" + baseWebpackConfig;
webpackConfigFile = pkgs.writeText "${name}-webpack-config" webpackConfig;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
inherit name; inherit name;
@ -77,7 +70,6 @@ let
patchPhase = '' patchPhase = ''
ln -sf ${nodeSource}/node_modules . ln -sf ${nodeSource}/node_modules .
cp ${webpackConfigFile} webpack.config.js
''; '';
shellHook = '' shellHook = ''

View File

@ -1,3 +1,5 @@
const ROUTES = ['/', '/about', '/404', '/posts', '/posts/viveahk', '/posts/librebasics']
const path = require('path') const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin')
const PrerenderSPAPlugin = require('prerender-spa-plugin') const PrerenderSPAPlugin = require('prerender-spa-plugin')