lx-music-desktop/build-config/main/webpack.config.base.js

35 lines
794 B
JavaScript
Raw Normal View History

2019-08-16 09:27:23 +00:00
const path = require('path')
2021-10-15 11:54:48 +00:00
const ESLintPlugin = require('eslint-webpack-plugin')
2019-08-16 09:27:23 +00:00
module.exports = {
target: 'electron-main',
output: {
filename: '[name].js',
libraryTarget: 'commonjs2',
path: path.join(__dirname, '../../dist/electron'),
},
resolve: {
alias: {
2020-11-28 12:23:17 +00:00
'@main': path.join(__dirname, '../../src/main'),
'@renderer': path.join(__dirname, '../../src/renderer'),
'@lyric': path.join(__dirname, '../../src/renderer-lyric'),
'@common': path.join(__dirname, '../../src/common'),
2019-08-16 09:27:23 +00:00
},
extensions: ['*', '.js', '.json', '.node'],
},
module: {
rules: [
2021-08-29 10:27:01 +00:00
{
test: /\.node$/,
use: 'node-loader',
},
2019-08-16 09:27:23 +00:00
],
},
performance: {
maxEntrypointSize: 300000,
},
2021-10-15 11:54:48 +00:00
plugins: [
new ESLintPlugin(),
],
2019-08-16 09:27:23 +00:00
}