Debian Codegraph @

ivette/src/dome/template/webpack.renderer.js

raw
1 /* ************************************************************************ */
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /* ************************************************************************ */
22
23 // --------------------------------------------------------------------------
24 // --- Webpack extension for electron main-process
25 // --------------------------------------------------------------------------
26
27 /*
28 Template from $(DOME)/template/webpack.main.js
29
30 This webpack definitions will be merged into electron-webpack
31 ones thanks to electron-webpack.json configuration file.
32
33 You may extend it with your own additions.
34 */
35
36 const path = require('path');
37 const DOME = process.env.DOME || path.resolve( __dirname , 'dome' );
38
39 // --------------------------------------------------------------------------
40
41 module.exports = {
42 module: {
43 rules: [
44 { test: /\.css$/, use: [ 'css-loader' ] },
45 { test: /\.(ts|js)x?$/, use: [ 'babel-loader' ], exclude: /node_modules/ }
46 ],
47 strictExportPresence: true
48 },
49 resolve: {
50 extensions: ['.ts', '.tsx', '.js', 'jsx', '.json'],
51 alias: {
52 'dome/misc': path.resolve( DOME , 'misc' ),
53 'dome/system': path.resolve( DOME , 'misc/system.ts' ),
54 'dome$': path.resolve( DOME , 'renderer/dome.tsx' ),
55 'dome': path.resolve( DOME , 'renderer' ),
56 'react-dom': '@hot-loader/react-dom'
57 }
58 },
59 devServer: {
60 watchOptions: {
61 ignored: '**/.#*'
62 }
63 }
64 } ;
65
66 // --------------------------------------------------------------------------