mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
34 lines
906 B
JavaScript
34 lines
906 B
JavaScript
|
const path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
target: 'node',
|
||
|
entry: './src/main.ts',
|
||
|
devtool: 'source-map', // https://webpack.js.org/configuration/devtool/
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.ts$/,
|
||
|
use: 'ts-loader', // https://webpack.js.org/guides/typescript/
|
||
|
exclude: /node_modules/,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
// Don't mock __dirname; https://webpack.js.org/configuration/node/#root
|
||
|
node: {
|
||
|
__dirname: false,
|
||
|
},
|
||
|
// Prevent bundling of certain imported packages and instead retrieve these
|
||
|
// external deps at runtime. This is what we want for electron, placed in the
|
||
|
// app by electron-packager. https://webpack.js.org/configuration/externals/
|
||
|
externals: {
|
||
|
electron: 'commonjs electron',
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: [ '.ts', '.js' ],
|
||
|
},
|
||
|
output: {
|
||
|
filename: 'main.js',
|
||
|
path: path.resolve(__dirname, 'lib'),
|
||
|
},
|
||
|
mode: 'none'
|
||
|
};
|