Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #5387
Closed
Open
Issue created Oct 10, 2018 by Administrator@rootContributor

Cannot use minified library written ES6 in RCA

Created by: pomek

Is this a bug report?

Yes.

Did you try recovering your dependencies?

Yes.

Which terms did you search for in User Guide?

I didn't find anything that could help me. I was searching for something that allows me to disable transpiling a library that was written ES6 and also minified.

Environment

node -v
v10.11.0

npm -v
6.4.1

Steps to Reproduce

Clone a demo (on the bottom of this comment) or follow steps listed below:

  1. Create an example app: npx create-react-app my-app
  2. Install CKEditor 5 dependencies: npm install @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic
  3. Replace src/App.js with:
import React, { Component } from 'react';
import CKEditor from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import './App.css';

class App extends Component {
	render() {
		return (
			<div className="App">
				<CKEditor
					editor={ClassicEditor}
					data="<p>Hello from CKEditor 5!</p>"
					onInit={editor => {
						// You can store the "editor" and use when it's needed.
						console.log( 'Editor is ready to use!', editor );
					}}
					onChange={( event, editor ) => {
						const data = editor.getData();
						console.log( { event, editor, data } );
					}}
				/>
			</div>
		);
	}
}

export default App;
  1. npm start

Expected Behavior

The application works, the dev-tools console does not contain any error.

Actual Behavior

A blank page and the following error in the console.

image

Additional informations

I wanted to check whether it will work if ckeditor5-build-classic won't be minified so I did steps specified below:

  1. Go to @ckeditor namespace in dependencies: cd node_modules/@ckeditor
  2. Remove ckeditor5-build-classic installed from npm: rm -r ckeditor5-build-classic
  3. Clone package from GitHub and check out to the proper version: git clone -b v11.1.0 git@github.com:ckeditor/ckeditor5-build-classic.git
  4. Go to the package and install dependencies: cd ckeditor5-build-classic && npm i
  5. Build the package in development mode: ./node_modules/.bin/webpack --mode development
  6. Go back to your application and call npm start again.

It works!

image

The question is - why doesn't minified build work?

Reproducible Demo

https://github.com/pomek/react-app

Assignee
Assign to
Time tracking