Registry / devops / qmlpragmalibrary-webpack-plugin

qmlpragmalibrary-webpack-plugin

JSON →
library0.0.1jsnpmunverified

Webpack plugin that prepends ".pragma library" to JavaScript output files for use as shared JavaScript resources in QML/Qt Quick applications. Current version 0.0.1, single initial release with no defined update cadence. Simple, minimal functionality; no alternatives known.

npm install qmlpragmalibrary-webpack-plugin
INSTALL
IMPORT
SIG · QMLPRAGMALIBRARY-W
Q
qmlpragmalibrary-webpack-plugin
devopsjavascriptv0.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QmlPragmaLibraryWebpackPlugin
const QmlPragmaLibraryWebpackPlugin = require('qmlpragmalibrary-webpack-plugin');
import QmlPragmaLibraryWebpackPlugin from 'qmlpragmalibrary-webpack-plugin';
The plugin is CommonJS-only; no ESM or default export.
QmlPragmaLibraryWebpackPlugin
const { QmlPragmaLibraryWebpackPlugin } = require('qmlpragmalibrary-webpack-plugin');
const { QmlPragmaLibraryWebpackPlugin } = require('qmlpragmalibrary-webpack-plugin');
Named export is not available; the plugin is exported as default via module.exports.
QmlPragmaLibraryWebpackPlugin
import QmlPragmaLibraryWebpackPlugin = require('qmlpragmalibrary-webpack-plugin');
import * as QmlPragmaLibraryWebpackPlugin from 'qmlpragmalibrary-webpack-plugin';
TypeScript may require 'import = require' syntax due to CommonJS export.

Sets up webpack to prepend .pragma library to the output JavaScript file for QML shared library usage.

const path = require('path'); const QmlPragmaLibraryWebpackPlugin = require('qmlpragmalibrary-webpack-plugin'); module.exports = { entry: './src/factorial.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'factorial.qml.js' }, plugins: [ new QmlPragmaLibraryWebpackPlugin() ] };
Debug
Known issues
gotchaThe plugin does not support ESM imports (no default export). Use CommonJS require().
fix
Use const QmlPragmaLibraryWebpackPlugin = require('qmlpragmalibrary-webpack-plugin');
affects: 0.0.1
gotchaOutput files must be named with .qml.js extension to be recognized as QML shared resources?
fix
Ensure webpack output filename ends with .qml.js as per Qt conventions.
affects: 0.0.1
gotchaPlugin version 0.0.1 is initial release; no breaking changes documented yet.
fix
Monitor repository for future breaking changes.
affects: 0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'qmlpragmalibrary-webpack-plugin'
Package not installed or incorrect require path.
fix
Run npm install qmlpragmalibrary-webpack-plugin --save-dev
TypeError: QmlPragmaLibraryWebpackPlugin is not a constructor
Attempting to use import statement with default import on a CommonJS module.
fix
Use require() instead: const QmlPragmaLibraryWebpackPlugin = require('qmlpragmalibrary-webpack-plugin');
Module not found: Error: Can't resolve 'qmlpragmalibrary-webpack-plugin'
Webpack cannot resolve the plugin package.
fix
Verify that the package is installed and located in node_modules.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
qmlpragmalibrary-webpack-plugin — npm install qmlpragmalibrary-webpack-plugin · libregistry