Nuns Practicing Misanthropy

    @foxitsoftware/addon-loader

    0.7.3 • Public • Published

    addon-loader

    A loader for webpack to preprocess Foxit PDF SDK for Web UIExtension addons.

    Getting Started

    To begin, you'll need to install our addon-loader:

    npm i -D @foxitsoftware/addon-loader

    Configure webpack.config.js

    module.exports = {
        module: {
            rules: [{
                test: /\.css$/,
                loader: ['style-loader', 'css-loader'] // resolve css resource in addon
            },{
                test: /addon.info.json/,
                use: [{
                    loader: 'babel-loader',
                    options: {
                        "presets": ["@babel/preset-env"]
                    }
                }, '@foxitsoftware/addon-loader'],
                type: 'javascript/auto'
            }]
        },
       externals: ['PDFViewCtrl']
    };

    Import in index.js

    import HContinuousAddon from 'path/to/sdk/lib/uix-addons/h-continuous/addon.info.json';
    import UIExtension from 'path/to/sdk/lib/UIExtension.full.js';
    
    new UIExtension.PDFUI({
        addons: [
            HContinuousAddon
        ],
        // ignored other irrelevant options
    })

    Keywords

    none

    Install

    npm i @foxitsoftware/addon-loader

    DownloadsWeekly Downloads

    210

    Version

    0.7.3

    License

    ISC

    Unpacked Size

    5.14 kB

    Total Files

    3

    Last publish

    Collaborators

    • rowanhanna
    • xinqiang_song
    • lzw4x
    • yongliang_huang
    • jim2018
    • foxitsdk
    • foxitniu
    • cancerq
    • linc0803
    • web-sdk-ci
    • webviewer
    • warerwang
    • zhiquan_ye
    • y1j2x34