From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../js/examples/wasm-demo/webpack.config.js | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 intl/icu_capi/js/examples/wasm-demo/webpack.config.js (limited to 'intl/icu_capi/js/examples/wasm-demo/webpack.config.js') diff --git a/intl/icu_capi/js/examples/wasm-demo/webpack.config.js b/intl/icu_capi/js/examples/wasm-demo/webpack.config.js new file mode 100644 index 0000000000..5e1f24040c --- /dev/null +++ b/intl/icu_capi/js/examples/wasm-demo/webpack.config.js @@ -0,0 +1,69 @@ +export default { + entry: { + index: [ + './src/ts/app.ts', + './src/scss/styles.scss', + ], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /\.(scss)$/, + use: [ + { + loader: 'style-loader', + }, + { + loader: 'css-loader' + }, + { + loader: 'postcss-loader', + options: { + postcssOptions: { + plugins: () => [ + require('autoprefixer') + ] + } + } + }, + { + loader: 'sass-loader' + } + ] + } + ] + }, + resolve: { + extensions: ['.ts', '.js'], + fallback: { + "fs": false, + }, + }, + mode: "production", + // mode: "development", + output: { + filename: 'bundle.js', + path: new URL('dist', import.meta.url).pathname, + }, + devServer: { + static: '.', + port: 8080, + hot: true, + headers: { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS", + "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization" + } + }, + experiments: { + topLevelAwait: true, + }, + optimization: { + minimize: false + }, +}; -- cgit v1.2.3