fix build

This commit is contained in:
Thomas Nordquist
2022-02-27 14:15:50 +01:00
parent d253c6c764
commit 24e9c4cd22
7 changed files with 4479 additions and 6507 deletions

View File

@@ -25,7 +25,8 @@
],
"exclude": [
"**/*.d.ts",
".src/**/*.png"
".src/**/*.png",
"./node_modules"
],
"awesomeTypescriptLoaderOptions": {
"useCache": true,

View File

@@ -1,7 +1,6 @@
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
module.exports = {
entry: {
@@ -49,22 +48,23 @@ module.exports = {
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.ts', '.mjs', '.m.js', '.tsx', '.js', '.json', '.node'],
// alias: { url: false }
},
module: {
rules: [
// All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
options: {
reportFiles: [
"src/**/*.{ts,tsx}",
"../backend/src/**/*.{ts,tsx}"
]
}
loader: 'ts-loader',
// options: {
// reportFiles: [
// "src/**/*.{ts,tsx}",
// "../backend/src/**/*.{ts,tsx}"
// ]
// }
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
// { enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
@@ -78,27 +78,26 @@ module.exports = {
},
],
},
{
test: /\.node$/,
use: {
loader: 'node-loader',
options: {
modules: true,
}
}
},
// {
// test: /\.node$/,
// use: {
// loader: 'node-loader',
// options: {
// modules: true,
// }
// }
// },
],
},
// node: { global: true },
plugins: [
new HtmlWebpackPlugin({ template: './index.html', file: './build/index.html', inject: false }),
// new BundleAnalyzerPlugin(),
new HardSourceWebpackPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin({
resourceRegExp: /\.\/build\/Debug\/addon/,
contextRegExp: /heapdump$/
}),
// new webpack.IgnorePlugin({
// resourceRegExp: /\.\/build\/Debug\/addon/,
// contextRegExp: /heapdump$/
// }),
],
// When importing a module whose path matches one of the following, just

File diff suppressed because it is too large Load Diff