Disable sourcemaps for production build by default in startertemplate

Created on 3 October 2023, about 1 year ago

Problem/Motivation

The started template will include sourcemaps containing eval() statements to the production build when used as shipped in this module. I think disabling sourcemaps using devtool: false would make more sense as the default in the webpack config. If someone needs devtools, they can enable it intentionally.

The main reason for this aside the fact that production builds shouldn't contain sourcemaps is, that builds containing such sourcemaps with eval() statements break ckeditor5 on sites sending a Content Security Policy header.

Steps to reproduce

  1. Ensure your site sends the Content Security Policy header containing unsafe-inline in the value
  2. Compile a plugin using the starter template and enable it

Result: ckeditor5 breaks.

Proposed resolution

Add devtool: false to the webpack config of the starter template.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024