RenaiApp/webpack.config.js

40 lines
715 B
JavaScript

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