mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
- feat: Sales invoices. - feat: Sales payment receives. - feat: Purchases bills. - feat: Purchases bills payments that made to the vendors.
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
const path = require('path');
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
function resolve(dir) {
|
|
return path.join(__dirname, '.', dir);
|
|
}
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: [
|
|
'@babel/plugin-transform-runtime',
|
|
'@/server.js',
|
|
],
|
|
target: 'node',
|
|
devtool: 'inline-cheap-module-source-map',
|
|
externals: [nodeExternals()],
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: 'dist/',
|
|
|
|
// use absolute paths in sourcemaps (important for debugging via IDE)
|
|
devtoolModuleFilenameTemplate: '[absolute-resource-path]',
|
|
devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]',
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
'~': path.resolve(__dirname, 'tests'),
|
|
},
|
|
extensions: [ '.tsx', '.ts', '.js' ],
|
|
},
|
|
module: {
|
|
rules: [
|
|
// {
|
|
// test: /\.(js)$/,
|
|
// loader: 'eslint-loader',
|
|
// enforce: 'pre',
|
|
// include: [resolve('src'), resolve('test')],
|
|
// options: {
|
|
// // eslint-disable-next-line global-require
|
|
// formatter: require('eslint-friendly-formatter'),
|
|
// // emitWarning: !config.dev.showEslintErrorsInOverlay
|
|
// },
|
|
// },
|
|
{
|
|
use: 'babel-loader',
|
|
exclude: /(node_modules)/,
|
|
test: /\.js$/,
|
|
},
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
};
|