Skip to content

Commit

Permalink
Customize dev-server port (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienjuif authored and jvanbruegge committed Oct 21, 2018
1 parent 821129b commit 976879d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
resolve,
setMode
} = require('@webpack-blocks/webpack');
const { css, file, url } = require('@webpack-blocks/assets');
const { file, url } = require('@webpack-blocks/assets');
const devServer = require('@webpack-blocks/dev-server');
const extractText = require('@webpack-blocks/extract-text');
const postcss = require('@webpack-blocks/postcss');
Expand All @@ -30,12 +30,13 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
const nodeExternals = require('webpack-node-externals');

const path = require('path');
const fs = require('fs');

const appPath = (...names) => path.join(process.cwd(), ...names);
const userConfig = require(appPath('webpack.config.js'));
const packageJson = require(appPath('package.json'));

const PORT = process.env.PORT || 8080

module.exports = webpackMerge(
createConfig([
setMode(
Expand Down Expand Up @@ -86,6 +87,7 @@ module.exports = webpackMerge(
]),
env('development', [
devServer({
port: PORT,
contentBase: appPath('public')
}),
sourceMaps(),
Expand Down

0 comments on commit 976879d

Please sign in to comment.