Skip to content

Commit

Permalink
Merge pull request #98 from 10up/fix/dev-server-public-path
Browse files Browse the repository at this point in the history
dev-server:Fix public path
  • Loading branch information
nicholasio authored Aug 5, 2021
2 parents fc419e6 + 918a42c commit 2270414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`webpack.config.js adds devServer config when passing the --dev-server f
Object {
"devServer": Object {
"compress": true,
"contentBase": "/config/webpack/public",
"contentBase": "public",
"port": 3000,
},
"devtool": "source-map",
Expand Down
4 changes: 1 addition & 3 deletions packages/toolkit/config/webpack/devServer.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const path = require('path');

module.exports = ({ isPackage, projectConfig: { devServer, devServerPort } }) => {
if (!devServer || !isPackage) {
return undefined;
}

return {
contentBase: path.join(__dirname, 'public'),
contentBase: 'public',
compress: true,
port: Number(devServerPort),
};
Expand Down

0 comments on commit 2270414

Please sign in to comment.