remove anyhow
This commit is contained in:
1540
rust/src_webpack/package-lock.json
generated
1540
rust/src_webpack/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"compression-webpack-plugin": "^11.1.0",
|
||||
"html-webpack-harddisk-plugin": "^2.0.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"raw-loader": "^4.0.2",
|
||||
|
@@ -3,54 +3,60 @@ const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
|
||||
const isDevServer = process.env.WEBPACK_SERVE;
|
||||
console.log("Dev server is " + isDevServer);
|
||||
var host;
|
||||
if (isDevServer){
|
||||
//ensure no trailing /
|
||||
host = 'http://10.23.44.186';
|
||||
if (isDevServer) {
|
||||
//ensure no trailing /
|
||||
host = 'http://10.23.44.186';
|
||||
} else {
|
||||
host = '';
|
||||
host = '';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
entry: ['./src/main.ts'],
|
||||
devtool: 'inline-source-map',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
PUBLIC_URL: JSON.stringify(host),
|
||||
}),
|
||||
new webpack.EnvironmentPlugin({
|
||||
redirect: 'true'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
alwaysWriteToDisk: true,
|
||||
title: "PlantCtrl",
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
type: 'asset/source',
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js', '.html'],
|
||||
},
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, '.'),
|
||||
},
|
||||
devServer: {
|
||||
}
|
||||
mode: "development",
|
||||
entry: ['./src/main.ts'],
|
||||
devtool: 'inline-source-map',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
PUBLIC_URL: JSON.stringify(host),
|
||||
}),
|
||||
new webpack.EnvironmentPlugin({
|
||||
redirect: 'true'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
alwaysWriteToDisk: true,
|
||||
title: "PlantCtrl",
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new CompressionPlugin({
|
||||
algorithm: "gzip",
|
||||
test: /\.js$|\.css$|\.html$/,
|
||||
threshold: 0,
|
||||
minRatio: 0.8
|
||||
})
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
type: 'asset/source',
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js', '.html'],
|
||||
},
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, '.'),
|
||||
},
|
||||
devServer: {}
|
||||
};
|
||||
|
Reference in New Issue
Block a user