Skip to content

Commit

Permalink
Merge pull request #173 from 0leksandr/define-webpack-public-path
Browse files Browse the repository at this point in the history
Define webpack `publicPath`
  • Loading branch information
berzniz authored Sep 8, 2021
2 parents 576c144 + a2d4d14 commit 788187f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const copyWebpackPlugins = [
{ from: './src/pages/options.css' }
]

// Try the environment variable, otherwise use root
const ASSET_PATH = process.env.ASSET_PATH || '/'

module.exports = {
mode: NODE_ENV,
entry: {
Expand All @@ -19,6 +22,7 @@ module.exports = {
},
output: {
path: path.join(__dirname, 'build', TARGET, NODE_ENV),
publicPath: ASSET_PATH,
filename: '[name].js'
},
module: {
Expand Down

0 comments on commit 788187f

Please sign in to comment.