Skip to content

#2977 is not really fixed. check it pls. #2979

Closed
@lornally

Description

@lornally
  • webpack version: 5.4.0
  • Node.js version: 15.5.0
  • Operating System: macos bigsur 11.1
  • Additional tools: vscode, coffeescript
  • NPM Version:7.3.0
  • webpack-dev-server Version: 3.11.0
  • Browser: chrome
  • This is a bug
  • This is a modification request

Code

# webpack.config.coffee
cmd = # here is another config

html = # here is config for html
	entry: d1: './src/d1.js'
	output:
		path: path.resolve __dirname, 'dist/html'
		filename: '[name].[contenthash].js'
	plugins: [
		new HtmlWebpackPlugin	title: 'Development'
	]
	devServer: contentBase: './dist/html'

module.exports=[html,cmd] # if i use this line, http://localhost:8080/ is ~/
module.exports=[html] # if i use this line, http://localhost:8080/ is right

Expected Behavior

http://localhost:8080/ show '~/', it should show the index.html of the website.

Actual Behavior

when i use "webpack serve", http://localhost:8080/ only show: '~/' (the blank directory)

For Bugs; How can we reproduce the behavior?

ref: #2977
this is useless: devServer: contentBase: './dist/html', publicPath: '/dist/html'
this can not fix the bug. i have push it in git : https://github.com/lornally/weppackserveissue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions