Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.2
-
-
bf38043b61 (qt/qtdeclarative/dev) 5d38f9641b (qt/qtdeclarative/6.2) 693b17076c (qt/qtdeclarative/6.3) 5d38f9641b (qt/tqtc-qtdeclarative/6.2) 693b17076c (qt/tqtc-qtdeclarative/6.3) bf38043b61 (qt/tqtc-qtdeclarative/dev) 5d38f9641b (qt/qtdeclarative/6.2.4)
Description
When adding a JavaScript module file (*.mjs) to a QML module, the file is not present in the generated qmldir file and thus cannot be imported properly.
# CMakeLists.txt qt_add_qml_module(myapp URI MyApp VERSION 0.1 RESOURCE_PREFIX /example.com/imports QML_FILES MathUtils.mjs SomeComponent.qml )
module MyApp linktarget myappplugin optional plugin myappplugin classname MyAppPlugin typeinfo myapp.qmltypes prefer :/example.com/imports/MyApp/ SomeComponent 0.0 SomeComponent.qml
It's possible to add mjs files to qmldir, so I'd expect it to appear there:
MathUtils 0.0 MathUtils.mjs
According to this comment this should already be the case, but it doesn't work apparently.
Attachments
Issue Links
- is duplicated by
-
QTBUG-100442 Javascript js files are not added into qmldir with qt_add_qml_module
- Closed
- resulted in
-
QTBUG-126510 [REG 6.6 -> 6.7] Type error due to clash between JS and Qml type names
- Closed