Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const path = require('path');
const slsw = require('serverless-webpack');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: slsw.lib.entries,
target: 'node',
devtool: 'source-map',
externals: [nodeExternals()],
mode: slsw.lib.webpack.isLocal ? 'development': 'production',
optimization: {
// We no not want to minimize our code.
minimize: false
},
performance: {
// Turn off size warnings for entry points
hints: false
},
resolve: {
extensions: ['.js', '.ts', '.json']
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'babel-loader',
const path = require('path');
const slsw = require('serverless-webpack');
module.exports = {
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
entry: slsw.lib.entries,
devtool: 'inline-source-map',
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
},
target: 'node',
module: {
rules: [
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{ test: /\.tsx?$/, loader: 'ts-loader' },
],
},
const path = require('path');
const slsw = require('serverless-webpack');
const entries = {};
Object.keys(slsw.lib.entries).forEach(key => (entries[key] = ['./source-map-install.js', slsw.lib.entries[key]]));
module.exports = {
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
entry: entries,
externals: { 'aws-sdk': 'aws-sdk' },
devtool: 'source-map',
resolve: { extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'] },
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js'
},
stats: 'errors-only',
target: 'node',
module: {
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
module.exports = (async () => {
const accountId = await slsw.lib.serverless.providers.aws.getAccountId();
return {
entry: slsw.lib.entries,
target: 'node',
devtool: 'source-map',
externals: [nodeExternals()],
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
performance: {
hints: false, // Turn off size warnings for entry points
},
stats: 'minimal', // https://github.com/serverless-heaven/serverless-webpack#stats
plugins: [
new webpack.DefinePlugin({
AWS_ACCOUNT_ID: `${accountId}`,
}),
],
module: {
const path = require('path');
const slsw = require('serverless-webpack');
const nodeExternals = require('webpack-node-externals');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: slsw.lib.entries,
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx']
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js'
},
target: 'node',
externals: [
nodeExternals(),
function(context, request, callback) {
if (/compiled/.test(request)) {
return callback(null, true);
}
callback();
const path = require('path');
const slsw = require('serverless-webpack')
module.exports = {
entry: slsw.lib.entries,
devtool: 'source-map',
module: {
rules: [
{
test: /\.ts?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.ts', '.js' ]
},
externals: {
"@eventuateinc/eventuate-nodejs-client": "@eventuateinc/eventuate-nodejs-client"
},
const path = require('path')
const slsw = require('serverless-webpack')
module.exports = {
entry: slsw.lib.entries,
devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
},
target: 'node',
module: {
loaders: [{test: /\.ts(x?)$/, loader: 'ts-loader'}],
},
}
const path = require("path");
const slsw = require("serverless-webpack");
const entries = {};
Object.keys(slsw.lib.entries).forEach(
key => (entries[key] = ["./source-map-install.js", slsw.lib.entries[key]])
);
module.exports = {
mode: slsw.lib.webpack.isLocal ? "development" : "production",
entry: entries,
devtool: "source-map",
resolve: {
extensions: [".js", ".jsx", ".json", ".ts", ".tsx", ".html"]
},
output: {
libraryTarget: "commonjs",
path: path.join(__dirname, ".webpack"),
filename: "[name].js"
},
target: "node",
const path = require('path');
const slsw = require('serverless-webpack');
const entries = {};
Object.keys(slsw.lib.entries).forEach(
key => (entries[key] = ['./source-map-install.js', slsw.lib.entries[key]])
);
module.exports = {
mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
entry: entries,
devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
},
target: 'node',
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const slsw = require('serverless-webpack');
module.exports = {
entry: slsw.lib.entries,
target: 'node',
externals: [nodeExternals()],
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.js$/,
use: [
{
loader: 'babel-loader'
}
],