diff --git a/generators/assets/webpack/templates/webpack.config.js.tmpl b/generators/assets/webpack/templates/webpack.config.js.tmpl index 3ff8a9967..f13cb422b 100644 --- a/generators/assets/webpack/templates/webpack.config.js.tmpl +++ b/generators/assets/webpack/templates/webpack.config.js.tmpl @@ -75,7 +75,7 @@ const configurator = { var config = { mode: env, entry: configurator.entries(), - output: {filename: "[name].[hash].js", path: `${__dirname}/public/assets`}, + output: {filename: "[name].[hash].js", path: `${__dirname}/public/assets`, publicPath: "/assets/"}, plugins: configurator.plugins(), module: configurator.moduleOptions() } diff --git a/render/template_helpers.go b/render/template_helpers.go index 4346e0d0b..5ce7552bd 100644 --- a/render/template_helpers.go +++ b/render/template_helpers.go @@ -27,9 +27,9 @@ func assetPathFor(file string) string { filePath := assetMap[file] if filePath == "" { - filePath = file + filePath = filepath.Join("/assets", file) } - return filepath.ToSlash(filepath.Join("/assets", filePath)) + return filepath.ToSlash(filePath) } type helperTag struct {