RenaiApp/webpack.config.js

45 lines
1.1 KiB
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
entry: {
bundle: path.resolve(__dirname, 'src/renderer.ts'),
},
target: 'electron-renderer',
output: {
path: path.resolve(__dirname, 'frontend'),
},
module: {
rules: [
{
test: /\.svelte$/,
loaders: [
{
loader: 'svelte-loader',
},
],
},
{
test: /\.ts$/,
loader: [
{
loader: 'ts-loader',
},
],
},
],
},
resolve: {
extensions: ['.js', '.ts'],
alias: {
atoms: path.resolve(__dirname, 'src/renderer/components/1-atoms'),
molecules: path.resolve(__dirname, 'src/renderer/components/2-molecules'),
polymers: path.resolve(__dirname, 'src/renderer/components/3-polymers'),
cells: path.resolve(__dirname, 'src/renderer/components/4-cells'),
organisms: path.resolve(__dirname, 'src/renderer/components/5-organisms'),
templates: path.resolve(__dirname, 'src/renderer/components/6-templates'),
services: path.resolve(__dirname, 'src/renderer/services'),
},
},
};