further components and bootstrap initial
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
const webpack = require('webpack');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
const isDevServer = process.env.WEBPACK_SERVE;
|
||||
console.log("Dev server is " + isDevServer);
|
||||
@@ -13,31 +15,35 @@ if (isDevServer){
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
entry: ['./src/index.ts'],
|
||||
entry: ['./src/main.ts'],
|
||||
devtool: 'inline-source-map',
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: "src/index.html",
|
||||
to: "index.html"
|
||||
}
|
||||
]
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
PUBLIC_URL: JSON.stringify(host),
|
||||
}),
|
||||
new webpack.EnvironmentPlugin({
|
||||
redirect: 'true'
|
||||
})
|
||||
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
alwaysWriteToDisk: true,
|
||||
title: "PlantCtrl",
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: "public/bootstrap-grid.css",
|
||||
to: "bootstrap-grid.css",
|
||||
}
|
||||
],
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
type: 'asset/source',
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
|
Reference in New Issue
Block a user