Skip to content
Myr

webpack.config.js

This file

Path

example/durable-objects/webpack.config.js

30 lines · 603 bytes · JavaScript

Last changed by

Fixed durable objects example (#46)Yusuke Wadabefore adoptiona22a0eb

History of this file

Take it

Support module workers syntax for Cloudflare Workers (#43)Yusuke Wadabefore adoptionfceed74

lines 1–5why, one step back
1const path = require('path')
23module.exports = {4 entry: './src/index.ts',5 output: {

Fixed durable objects example (#46)Yusuke Wadabefore adoptiona22a0eb

line 6why, one step back
6 filename: 'worker.mjs',

Support module workers syntax for Cloudflare Workers (#43)Yusuke Wadabefore adoptionfceed74

lines 7–30why, one step back
7 libraryTarget: 'module',
8 path: path.join(__dirname, 'dist'),9 },10 devtool: 'cheap-module-source-map',11 mode: 'development',12 resolve: {13 extensions: ['.ts', '.tsx', '.js'],14 },15 module: {16 rules: [17 {18 test: /\.tsx?$/,19 loader: 'ts-loader',20 options: {21 // transpileOnly is useful to skip typescript checks occasionally:22 transpileOnly: true,23 },24 },25 ],26 },27 experiments: {28 outputModule: true,29 },30}