RenaiApp/scripts/webpack.config.js

35 lines
698 B
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
entry: path.resolve(__dirname, '../src/renderer.ts'),
target: 'electron10-renderer',
output: {
path: path.resolve(__dirname, '../frontend'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.svelte$/,
loader: 'svelte-loader',
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
configFile: path.resolve('tsconfig.renderer.json'),
},
},
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
},
],
},
resolve: {
extensions: ['.ts', '.js', '.mjs'],
},
};