mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-18 08:02:13 +03:00
2681ad361b
Co-authored-by: Quentin Goinaud <armaldio@gmail.com> Co-authored-by: Lucas Fernandes Nogueira <lucasfernandesnog@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
const path = require('path')
|
|
const nodeExternals = require('webpack-node-externals')
|
|
|
|
module.exports = {
|
|
entry: {
|
|
'api/build': './src/api/build.ts',
|
|
'api/dev': './src/api/dev.ts',
|
|
'api/init': './src/api/init.ts',
|
|
'api/tauricon': './src/api/tauricon.ts',
|
|
'api/info': './src/api/info.ts',
|
|
'helpers/tauri-config': './src/helpers/tauri-config.ts',
|
|
'helpers/spawn': './src/helpers/spawn.ts'
|
|
},
|
|
mode: process.env.NODE_ENV || 'development',
|
|
devtool: 'source-map',
|
|
module: {
|
|
rules: [{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /(templates|api)[\\/].+\.js/,
|
|
use: 'raw-loader'
|
|
},
|
|
{
|
|
test: /\.toml?$/,
|
|
use: 'toml-loader'
|
|
}
|
|
]
|
|
},
|
|
node: false,
|
|
resolve: {
|
|
extensions: ['.ts', '.js']
|
|
},
|
|
output: {
|
|
library: 'tauri',
|
|
libraryTarget: 'umd',
|
|
filename: '[name].js',
|
|
path: path.resolve(__dirname, 'dist')
|
|
},
|
|
externals: [nodeExternals()],
|
|
target: 'node'
|
|
}
|