tauri/cli/tauri.js/webpack.config.js
Lucas Fernandes Nogueira 3ce95d2760
feat(tauri.js) add tauri info command (#236)
* feat(tauri.js) add `tauri info` command

* fix(bug-report): add command information
- thanks @nklayman for the reminder

* fix(tauri-info): add cargo version

* feat(tauri.js) add cargo.toml and tauri.conf.json info

Co-authored-by: nothingismagick <drthompsonsmagickindustries@gmail.com>
2019-12-27 20:37:21 -03:00

41 lines
905 B
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',
'helpers/tauri-config': './src/helpers/tauri-config.ts',
'api/info': './src/api/info.ts'
},
mode: process.env.NODE_ENV || 'development',
devtool: 'source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /tauri\.js$/i,
loader: 'raw-loader'
}
]
},
node: false,
resolve: {
extensions: ['.ts', '.js']
},
output: {
library: 'tauri',
libraryTarget: 'umd',
filename: '[name].js',
path: path.resolve(__dirname, 'dist')
},
externals: [nodeExternals()],
target: 'node'
}