tauri/cli/tauri.js/webpack.config.js
Lucas Fernandes Nogueira 37afc5b0dc
fix(tauri.js) determine app path correctly (#493)
* fix(tauri.js) determine app path correctly

* fix(lint): replace backtick with single-quote

* fix(tests) mock app-paths

* fix(tauri.js) linting

* fix(test) use local tauri on empty fixture

* fix(tauri.js) linting

* fix(workflows) use local tauri-bundler test-tauri-js-cli

* fix(workflows) wrong cargo install command

* fix(tauri) comment webview-spawning test

Co-authored-by: nothingismagick <denjell@sfosc.org>
2020-03-09 21:27:54 -03:00

42 lines
981 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',
'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[\\/](tauri|mutation-observer)\.js/,
use: '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'
}