@dotdev/serverless-webpack-compiler
v1.1.2
Published
Serverless Framework Plugin to run Webpack Compilers
Downloads
8
Maintainers
Keywords
Readme
Serverless Plugin Webpack Compiler
Plugin for Serverless which runs Webpack Compilers during the packaging routine.
Install
This package is private and requires access to the @dotdev
organization to install.
yarn add -D @dotdev/serverless-webpack-compiler
Usage
Configure serverless.yml
plugins, options & excludes.
plugins:
- "@dotdev/serverless-webpack-compiler"
package:
exclude:
- "./node_modules/.bin/**" # Optional
- "./node_modules/.cache/**" # Optional
custom:
serverless-webpack-compiler:
configuration: "webpack.config.js" # Relative path to webpack configuration.
outputDirectory: "package" # Relative webpack output directory.
Configure webpack.config.js
options.
const WebpackPluginServerless = require("@dotdev/serverless-webpack-compiler");
module.exports = {
entry: WebpackPluginServerless.webpackEntry,
output: WebpackPluginServerless.webpackOutput,
};
Yarn Workspaces
Configure package.json
dependency hoisting.
{
"workspaces": {
"nohoist": [
"**/*"
]
},
}