diff --git a/internal/web_bundle/create_webpack_config.js b/internal/web_bundle/create_webpack_config.js index 7b4a914..7921622 100644 --- a/internal/web_bundle/create_webpack_config.js +++ b/internal/web_bundle/create_webpack_config.js @@ -68,6 +68,7 @@ module.exports = ( const base = path.join(process.cwd(), sourceDir) const gendir = path.join(base, process.env["GENDIR"], '..', 'bin') + const gendir2 = path.join(base, process.env["GENDIR"]) return { entry: (sourceDir.startsWith("/") ? "" : "./") + path.join( @@ -232,6 +233,7 @@ module.exports = ( path.join(loadersNpmPackagesDir, "node_modules"), base, gendir, + gendir2, ] }, resolveLoader: { diff --git a/internal/web_bundle/rule.bzl b/internal/web_bundle/rule.bzl index 6bb8f39..159088c 100644 --- a/internal/web_bundle/rule.bzl +++ b/internal/web_bundle/rule.bzl @@ -173,7 +173,7 @@ server.listen(port, 'localhost', function (err) {{ ctx.actions.write( output = ctx.outputs.devserver, is_executable = True, - content = "NODE_PATH=" + ctx.attr._internal_packages[NpmPackagesInfo].installed_dir.short_path + "/node_modules " + ctx.file._internal_nodejs.path + " " + webpack_devserver_js.short_path, + content = "GENDIR=" + ctx.var["GENDIR"] + " NODE_PATH=" + ctx.attr._internal_packages[NpmPackagesInfo].installed_dir.short_path + "/node_modules " + ctx.file._internal_nodejs.path + " " + webpack_devserver_js.short_path, ) return [