serverless
Version:
Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more
33 lines (27 loc) • 685 B
JavaScript
const path = require('path');
const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin');
const wasmDir = 'rust-wasm';
module.exports = {
entry: {
helloWorld: [
path.join(__dirname, `./${wasmDir}/pkg/rust_wasm.js`),
path.join(__dirname, './helloWorld.js'),
],
},
resolve: {
extensions: ['.js'],
},
output: {
filename: '[name].js',
path: path.join(__dirname, 'dist'),
},
plugins: [
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, wasmDir),
extraArgs: '--no-typescript --target no-modules',
}),
],
//devtool: 'inline-source-map',
target: 'web',
mode: process.env.NODE_ENV || 'production',
};