Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #721 from marianoeramirez/master
Browse files Browse the repository at this point in the history
Support for static url
  • Loading branch information
dominik-zeglen authored Sep 29, 2020
2 parents 467e319 + 903b115 commit e259378
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/webpack/config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const path = require("path");
if (!process.env.API_URI) {
throw new Error("Environment variable API_URI not set");
}
const STATIC_URL = process.env.STATIC_URL || '/';

module.exports = ({ sourceDir, distDir }) => ({
devtool: "source-map",
Expand Down Expand Up @@ -84,7 +85,7 @@ module.exports = ({ sourceDir, distDir }) => ({
},
output: {
path: distDir,
publicPath: "/",
publicPath: STATIC_URL,
},
plugins: [
new CleanWebpackPlugin({
Expand Down
3 changes: 2 additions & 1 deletion config/webpack/config.prod.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const MiniCssExtractPlugin = require("mini-css-extract-plugin");


module.exports = ({ sourceDir, distDir }) => ({
output: {
filename: "js/[name].[contenthash].js"
filename: "js/[name].[contenthash].js",
},
module: {
rules: [
Expand Down

0 comments on commit e259378

Please sign in to comment.