opentiny / opentiny/tiny-editor

🐛 [Bug]: webpack 5 编译报错,无法使用

Open
#337 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
535
Forks
71
Avg merge
6h 50m
Merged PRs (30d)
2

Description

Version

4.0-alpha.2

Link to minimal reproduction

***.vue 中引入

import TinyEditor from '@opentiny/fluent-editor';
import '@opentiny/fluent-editor/style.css'; // 引入样式

webpack 5 编译时报错

Can't resolve 'quill/themes/base' in '**/es/modules/link/modules' 
Step to reproduce

import TinyEditor from '@opentiny/fluent-editor';
import '@opentiny/fluent-editor/style.css'; // 引入样式

webpack 5 编译时报错

What is expected

***.vue 中引入

import TinyEditor from '@opentiny/fluent-editor';
import '@opentiny/fluent-editor/style.css'; // 引入样式

webpack 5 编译时报错

Can't resolve 'quill/themes/base' in '**/es/modules/link/modules' 
What is actually happening

No response

What is your project name

cws

Any additional comments (optional)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown TinyEditor and style.css imports in a webpack 5 project. Inspect the package path **/es/modules/link/modules and its resolution of quill/themes/base; done means the same imports compile successfully without the module-resolution error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.