@edon-app/webpack
v2.0.1
Published
takes generated modules from the edon app. When the module is created, aliases are created with the names specified in the application.
Readme
Edon Webpack
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Edon Webpack takes generated modules from the edon app. When the module is created, aliases are created with the names specified in the application.
Installation
Use NPM or Yarn to install as a development dependency:
# with NPM
npm install @edon-app/webpack --save-dev
# with Yarn
yarn add @edon-app/webpack --devUsage
Require the plugin in the webpack configuration file, then create and add modules in the plugins array in the
webpack configuration object:
var EdonLivePlugin = require("@edon-app/webpack");
module.exports = {
// ...
plugins: [new EdonLivePlugin({
rootPath : 'Get the App path from the edon application settings and give it to the plugin.',
basePath : 'Get the React path from the edon application settings and give it to the plugin.',
baseResolve : 'Prefix to import module. (Optional) default: render-module'
})],
};You can now import your modules anywhere in the application and use them.
To get the module names, use the edon program and add @{baseResolve} with "/" before the name, as shown: @render-module/{container} or @{baseResolve}/{container}
var Provider = require("@render-module/Provider");
// You can now use Provider
console.log(Provider);