summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/examples/wasm-demo/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu_capi/js/examples/wasm-demo/webpack.config.js')
-rw-r--r--intl/icu_capi/js/examples/wasm-demo/webpack.config.js69
1 files changed, 69 insertions, 0 deletions
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
+ },
+};