Skip to content

devServer ignore port param when load chunks #1717

@esomkin

Description

@esomkin
  • Operating System: MacOS
  • Node Version: 11.9
  • NPM Version: 6.9
  • webpack Version: 4.29.0
  • webpack-dev-server Version: 3.1.14
  • This is a bug
  • This is a modification request

Code

...
entry: {
	'test/index': [ './resources/assets/modules/test/index', ],
},
output: {
	path: path.resolve(__dirname, './public/build/'),
	publicPath: '/build/',
	filename: '[name].js',
	chunkFilename: '[name].js',
},
...
devServer: {
	host: 'domain',
	port: 8080,
},
import React, { Component, Suspense, lazy, } from 'react';

const BlazyComponent = lazy(() => {
	return import('./blazy');
});

class Main extends Component {
	render () {
		return (<Suspense fallback={<div>Loading...</div>}>
			<BlazyComponent/>
		</Suspense>);
	}
}

export default Main;

Expected Behavior

Load chunk from http://domain:8080/build/0.js

Actual Behavior

Try load chunk from http://domain/build/0.js

For Bugs; How can we reproduce the behavior?

Simply create react environment with dynamic import support

For Features; What is the motivation and/or use-case for the feature?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions