tauri/cli/tauri.js/webpack.config.js
Lucas Fernandes Nogueira 78f1e03495
feat(tauri.js) inject MutationObserver to lazy load JS/CSS on no… (#355)
* feat(tauri.js) inject MutationObserver to lazy load scripts on no-server

* feat(tauri.js) add disable inliner config

* fix(tauri.js) add types

* feat(tauri.js&tauri) lazy load CSS files on mutation observer
2020-01-27 10:03:27 -03:00

37 lines
830 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/
}
]
},
node: false,
resolve: {
extensions: ['.ts', '.js']
},
output: {
library: 'tauri',
libraryTarget: 'umd',
filename: '[name].js',
path: path.resolve(__dirname, 'dist')
},
externals: [nodeExternals()],
target: 'node'
}