This commit is contained in:
lyswhut
2022-10-29 11:36:35 +08:00
parent 66b965d9f7
commit e45cee6596
715 changed files with 57096 additions and 31771 deletions
+15 -2
View File
@@ -5,9 +5,17 @@ module.exports = {
target: 'electron-main',
output: {
filename: '[name].js',
libraryTarget: 'commonjs2',
library: {
type: 'commonjs2',
},
path: path.join(__dirname, '../../dist'),
},
externals: [
'font-list',
'better-sqlite3',
'bufferutil',
'utf-8-validate',
],
resolve: {
alias: {
'@main': path.join(__dirname, '../../src/main'),
@@ -15,7 +23,7 @@ module.exports = {
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
'@common': path.join(__dirname, '../../src/common'),
},
extensions: ['*', '.js', '.json', '.node'],
extensions: ['.tsx', '.ts', '.js', '.mjs', '.json', '.node'],
},
module: {
rules: [
@@ -23,6 +31,11 @@ module.exports = {
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
plugins: [