1.0.1 • Published 5 years ago
@activeprospect/integration-dev-webpack v1.0.1
Webpack for LeadConduit Integrations
Usage
Include this as a devDependencies entry in integrations with a "rich UI".
Note that though this dependency package depends on express, that package is not in this one's package.json. Any integration that uses this package must also require express. Including it here could lead one to omit it from the integration, where it must be explictly required. In other words, leaving it out here is on purpose. :-)
Conversion
To convert old integrations to use this:
- add it as a
devDependenciesentry inpackage.json - remove all
webpack-*dependencies frompackage.json - change the pre-publish script (the script name "prepublishOnly" is now recommended over "prepare") in
package.jsonfrom:
"prepare": "webpack --config lib/ui/webpack.config.js",to:
"prepublishOnly": "webpack --config node_modules/@activeprospect/integration-dev-webpack/webpack.config.js",- change
lib/ui/index.jsfrom:
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
router.use(require('./webpack'));
}...to:
if (process.env.NODE_ENV === 'development') {
router.use(require('@activeprospect/integration-dev-webpack'));
}delete the two boilerplate webpack files:
rm lib/ui/webpack.config.js lib/ui/webpack.js1.0.1
5 years ago