Changeset View
Changeset View
Standalone View
Standalone View
web/webpack.config.cjs
const AssetsPlugin = require('assets-webpack-plugin'); | |||||
const CopyPlugin = require('copy-webpack-plugin'); | const CopyPlugin = require('copy-webpack-plugin'); | ||||
const path = require('path'); | const path = require('path'); | ||||
const { WebpackManifestPlugin } = require('webpack-manifest-plugin'); | |||||
const { | const { | ||||
createProdBrowserConfig, | createProdBrowserConfig, | ||||
createDevBrowserConfig, | createDevBrowserConfig, | ||||
createNodeServerRenderingConfig, | createNodeServerRenderingConfig, | ||||
createWebWorkersConfig, | createWebWorkersConfig, | ||||
} = require('lib/webpack/shared.cjs'); | } = require('lib/webpack/shared.cjs'); | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | plugins: [ | ||||
new CopyPlugin({ | new CopyPlugin({ | ||||
patterns: [ | patterns: [ | ||||
{ | { | ||||
from: 'node_modules/@matrix-org/olm/olm.wasm', | from: 'node_modules/@matrix-org/olm/olm.wasm', | ||||
to: path.join(__dirname, 'dist', 'olm.[contenthash:12].wasm'), | to: path.join(__dirname, 'dist', 'olm.[contenthash:12].wasm'), | ||||
}, | }, | ||||
], | ], | ||||
}), | }), | ||||
new AssetsPlugin({ | new WebpackManifestPlugin({ | ||||
filename: 'assets.json', | publicPath: '', | ||||
path: path.join(__dirname, 'dist'), | |||||
removeFullPathAutoPrefix: true, | |||||
}), | }), | ||||
], | ], | ||||
}; | }; | ||||
const baseNodeServerRenderingConfig = { | const baseNodeServerRenderingConfig = { | ||||
externals: ['react', 'react-dom', 'react-redux'], | externals: ['react', 'react-dom', 'react-redux'], | ||||
entry: { | entry: { | ||||
keyserver: ['./loading.react.js'], | keyserver: ['./loading.react.js'], | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |