Skip to content

Commit

Permalink
Fix webpack publicPath in standalone mode. (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
newswangerd authored Mar 31, 2020
1 parent d1cd492 commit b657990
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ module.exports = inputConfigs => {
};

if (customConfigs.DEPLOYMENT_MODE === 'standalone') {
console.log('Overriding app entry for standalone mode.');
console.log('Overriding configs for standalone mode.');

const newEntry = resolve(__dirname, '../src/entry-standalone.tsx');
console.log(`New entry: ${newEntry}`);
const newPubPath = ''
console.log(`New entry.App: ${newEntry}`);
console.log(`New output.publicPath: ${newPubPath}`);

newWebpackConfig.entry.App = newEntry;
newWebpackConfig.output.publicPath = newPubPath;
}

plugins.push(new webpack.DefinePlugin(globals));
Expand Down

0 comments on commit b657990

Please sign in to comment.