Skip to content

"doesn't provide an export named: 'Quill'" and "doesn't provide an export named: 'Delta'" #681

@mateusfmello

Description

@mateusfmello

Version
"@vueup/vue-quill": "^1.2.0"

Describe the bug
The JavaScript execution fails, nothing is displayed on the screen, and an error occurs in the console.

To Reproduce
Follow the instructions on how to use the pages:

Expected behavior
Text editor preview

Browser (please complete the following information):
All browsers

Additional context

package.json

{
	"name": "xyz",
	"version": "0.0.1",
	"private": true,
	"type": "module",
	"engines": {
		"node": "^20.19.0 || >=22.12.0"
	},
	"scripts": {
		"dev": "vite",
		"build": "run-p type-check \"build-only {@}\" --",
		"preview": "vite preview",
		"build-only": "vite build",
		"type-check": "vue-tsc --build",
		"lint": "eslint . --fix --cache"
	},
	"dependencies": {
		"@fortawesome/fontawesome-svg-core": "^7.1.0",
		"@fortawesome/free-brands-svg-icons": "^7.1.0",
		"@fortawesome/pro-light-svg-icons": "^7.1.0",
		"@fortawesome/vue-fontawesome": "^3.1.2",
		"@primeuix/themes": "^1.2.5",
		"@tailwindcss/postcss": "^4.1.16",
		"@vueup/vue-quill": "^1.2.0",
		"@vueuse/core": "^14.0.0",
		"chart.js": "^4.5.1",
		"pinia": "^3.0.3",
		"postcss": "^8.5.6",
		"primevue": "^4.4.1",
		"tailwindcss": "^4.1.16",
		"tailwindcss-primeui": "^0.6.1",
		"vue": "^3.5.22",
		"vue-router": "^4.6.3"
	},
	"devDependencies": {
		"@primevue/auto-import-resolver": "^4.4.1",
		"@tsconfig/node22": "^22.0.2",
		"@types/node": "^22.18.11",
		"@vitejs/plugin-vue": "^6.0.1",
		"@vue/eslint-config-typescript": "^14.6.0",
		"@vue/tsconfig": "^0.8.1",
		"eslint": "^9.37.0",
		"eslint-plugin-vue": "~10.5.0",
		"jiti": "^2.6.1",
		"npm-run-all2": "^8.0.4",
		"patch-package": "^8.0.1",
		"sass-embedded": "^1.93.3",
		"typescript": "~5.9.0",
		"unplugin-vue-components": "^30.0.0",
		"vite": "^7.1.11",
		"vite-plugin-vue-devtools": "^8.0.3",
		"vue-tsc": "^3.1.1"
	}
}

Layout.vue

<script setup lang="ts">
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.bubble.css';
</script>

<template>
<div>
	<QuillEditor theme="bubble" />
</div>
</template>

<style scoped lang="scss">
</style>

1º console error:

SyntaxError: The requested module 'http://localhost:5173/node_modules/quill/dist/quill.js?v=ed3f22a4' doesn't provide an export named: 'Quill'

[Vue Router warn]: Unexpected error when starting the router: SyntaxError: The requested module 'http://localhost:5173/node_modules/quill/dist/quill.js?v=ed3f22a4' doesn't provide an export named: 'Quill'

Solution:
vite.config.ts

export default defineConfig({
	optimizeDeps: {
		include: ['quill']
	}
})

2º console error:

SyntaxError: The requested module 'http://localhost:5173/node_modules/quill-delta/dist/Delta.js?v=66a34e59' doesn't provide an export named: 'Delta'

[Vue Router warn]: Unexpected error when starting the router: SyntaxError: The requested module 'http://localhost:5173/node_modules/quill-delta/dist/Delta.js?v=66a34e59' doesn't provide an export named: 'Delta'

Solution:
vite.config.ts

export default defineConfig({
	optimizeDeps: {
		include: ['quill', 'quill-delta']
	}
})

Final considerations

If there is a way to do this, it would be helpful to automatically signal Vite to correctly compile Quill. If there isn't a way, it's important to add the Vite configuration to the Quill Vue documentation.

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