Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion template/build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
https: config.dev.https,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! We still have to add the actual property to /config/index.js file so people can know about the option's existance without studying the webpack files.

host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
Expand Down Expand Up @@ -78,11 +79,13 @@ module.exports = new Promise((resolve, reject) => {
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// which protocol to show in notifications
const protocol = devWebpackConfig.devServer.https ? 'https': 'http';

// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
messages: [`Your application is running here: ${protocol}://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
Expand Down