mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-05 10:13:00 +02:00
* feat(tauri.js): move to typescript * fix(tauri.js): properly export api as commonjs * feat(tauri.js): convert tauricon to typescript * fix(tauri.js/tauricon): type error * chore(tauri.js/package): update yarn.lock * chore(tauri.js/package): add build/pretest scripts * refactor(tauri.js/template): remove duplicate types * chore(tauri.js) lint-fix * fix(tauri.js) build tauricon.ts * chore(tauri.js) remove unused code Co-authored-by: nothingismagick <drthompsonsmagickindustries@gmail.com> Co-authored-by: Lucas Fernandes Nogueira <lucasfernandesnog@gmail.com>
35 lines
708 B
JavaScript
35 lines
708 B
JavaScript
const path = require('path')
|
|
const nodeExternals = require('webpack-node-externals')
|
|
|
|
module.exports = {
|
|
entry: {
|
|
build: './src/api/build.ts',
|
|
dev: './src/api/dev.ts',
|
|
init: './src/api/init.ts',
|
|
tauricon: './src/api/tauricon.ts'
|
|
},
|
|
mode: process.env.NODE_ENV || 'development',
|
|
devtool: 'source-map',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/
|
|
}
|
|
]
|
|
},
|
|
node: false,
|
|
resolve: {
|
|
extensions: ['.ts', '.js']
|
|
},
|
|
output: {
|
|
library: 'tauri',
|
|
libraryTarget: 'umd',
|
|
filename: '[name].js',
|
|
path: path.resolve(__dirname, 'dist')
|
|
},
|
|
externals: [nodeExternals()],
|
|
target: 'node'
|
|
}
|