Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature (build-*): Local development server. Closes #10043. #10130

Closed
wants to merge 1 commit into from

Conversation

christianztamayo
Copy link

@christianztamayo christianztamayo commented Jul 12, 2021

Helps improve productivity with live reload via webpack-dev-server.
Useful for developing plugins, doing customizations, etc.
Starts the server by running yarn start inside a build package's directory.

Affects ckeditor5-build-* packages:

  • ckeditor5-build-balloon
  • ckeditor5-build-balloon-block
  • ckeditor5-build-classic
  • ckeditor5-build-decoupled-document
  • ckeditor5-build-inline

Closes #10043


Additional information

Re-opening outdated PRs from the now archived build-classic, as well as the added documentation on ckeditor/ckeditor5.

Implementation: ckeditor/ckeditor5-build-classic#94
Documentation: #6064

ckeditor/ckeditor5-build-classic#94 (comment) has been addressed on this PR as well.

Helps improve productivity with live reload via webpack-dev-server.
Useful for developing plugins, doing customizations, etc.
Starts the server by running `yarn start` inside a build package's directory.

Affects ckeditor5-build-* packages:
- ckeditor5-build-balloon
- ckeditor5-build-balloon-block
- ckeditor5-build-classic
- ckeditor5-build-decoupled-document
- ckeditor5-build-inline
@adamerose
Copy link

To get this working on webpack 5 I think you'd need to change this

devServer: {
	compress: true,
	contentBase: [
		path.resolve( __dirname, 'sample' ),
		path.resolve( __dirname, 'tests' )
	],
	open: true,
	publicPath: '/assets/',
	watchContentBase: true
},

to this

devServer: {
	static: [
		{
			directory: path.join(__dirname, 'sample'),
			watch: true,
			publicPath: '/assets',
			serveIndex: true,
		},
		{
			directory: path.join(__dirname, 'tests'),
			watch: true,
			publicPath: '/assets',
			serveIndex: true,
		},
	],
	compress: true,
	open: true,
},

@itwondersteam
Copy link

itwondersteam commented Apr 4, 2023

why this PR is closed? live reload is helpful for plugin development.

Update:
Well, it seems that the previous MR is not for webpack 5 :/

@adamerose
Copy link

For anyone arriving here from Google I think the best route now is use the new package generator which comes with hot reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local development server
3 participants