Skip to content
This repository was archived by the owner on Nov 18, 2018. It is now read-only.

[Deprecated] - Convert webpack's AMD output into a valid Dojo Module, invokable by a 'executeBundle()' method

License

Notifications You must be signed in to change notification settings

innerjoin/dojo-module-wrapper-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

dojo-module-wrapper-webpack-plugin

Usage

This plugin requires a valid webpack configuration. It should contain the following information:

const DojoModuleWrapperPlugin = require('dojo-module-wrapper-webpack-plugin');

module.exports = {
    entry: {
        app: '<entry point of main JS class>',
    },
    output: {
        libraryTarget: 'amd',
        filename: '<bundle destination>',
    },
    module: {
        // module transformations
    },

    plugins: [
        new DojoModuleWrapperPlugin({
            app: {
                moduleName: '<the full name of your bundle>'
            },
        }),
    ],

    externals: [
        // exclude dojo, dijit and dojox from bundling
        (context, request, callback) => {
            if (/^dojo/.test(request) ||
                /^dojox/.test(request) ||
                /^dijit/.test(request)
            ) {
                return callback(null, `amd ${request}`);
            }
            callback();
        },
    ],
};

About

[Deprecated] - Convert webpack's AMD output into a valid Dojo Module, invokable by a 'executeBundle()' method

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •