2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00
books/vue.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.8 KiB
JavaScript
Raw Normal View History

const path = require('path');
const webpack = require('webpack');
module.exports = {
pluginOptions: {
electronBuilder: {
externals: ['knex', 'better-sqlite3'],
nodeIntegration: true,
mainProcessFile: 'main.ts',
disableMainProcessTypescript: false,
mainProcessTypeChecking: true,
chainWebpackRendererProcess: (config) => {
config.target('electron-renderer');
config.resolve.alias.set('fyo', path.resolve(__dirname, './fyo'));
config.resolve.alias.set('utils', path.resolve(__dirname, './utils'));
},
chainWebpackMainProcess: (config) => {
config.target('electron-main');
config.resolve.alias.set('fyo', path.resolve(__dirname, './fyo'));
config.resolve.alias.set('utils', path.resolve(__dirname, './utils'));
config.module
.rule('js')
.test(/\.js$/)
.use('babel')
.loader('babel-loader');
},
},
},
pages: {
index: {
entry: 'src/renderer.ts',
filename: 'index.html',
},
},
parallel: false,
runtimeCompiler: true,
lintOnSave: process.env.NODE_ENV !== 'production',
configureWebpack(config) {
Object.assign(config.resolve.alias, {
fyo: path.resolve(__dirname, './fyo'),
2022-04-20 06:38:47 +00:00
src: path.resolve(__dirname, './src'),
2022-03-28 10:01:29 +00:00
schemas: path.resolve(__dirname, './schemas'),
backend: path.resolve(__dirname, './backend'),
models: path.resolve(__dirname, './models'),
utils: path.resolve(__dirname, './utils'),
regional: path.resolve(__dirname, './regional'),
reports: path.resolve(__dirname, './reports'),
2022-05-10 09:26:17 +00:00
dummy: path.resolve(__dirname, './dummy'),
2022-04-20 06:38:47 +00:00
fixtures: path.resolve(__dirname, './fixtures'),
});
2020-01-28 11:10:01 +00:00
config.module.rules.push({
test: /\.txt$/i,
use: 'raw-loader',
2020-01-28 11:10:01 +00:00
});
config.devtool = 'source-map';
},
};