调整板初始化代码,新增自定义编号

This commit is contained in:
xief
2023-07-13 11:57:28 +08:00
parent eb736bce84
commit e70354267b
7 changed files with 1273 additions and 2326 deletions

View File

@@ -20,18 +20,74 @@ const config: webpack.Configuration = {
//模块加载器设置
module: {
rules: [
{
test: /\.worker\.ts$/,
exclude: /node_modules/,
use: [
{ loader: 'worker-loader', },
...TS_LOADER
]
},
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: TS_LOADER,
},
{ test: /\.css$/, loader: ['style-loader', 'css-loader'] },
{ test: /\.[(jpg)|(png)|(obj)|(json)]$/, loader: "url-loader" },
{
test: /\.[(png)|(obj)|(json)]$/,
loader: "file-loader"
},
//样式加载 css
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
//样式加载 less
{
test: /\.less$/,
use: [
{ loader: "style-loader" },
{ loader: 'css-loader', options: { sourceMap: false } },
{
loader: "less-loader",
options: {
lessOptions: {
strictMath: true,
noIeCompat: true
}
}
}
]
},
//字体加载 blueprint
{
test: /\.(ttf|eot|svg|FBX)$/,
use: {
loader: 'file-loader',
options: { name: 'fonts/[contenthash].[ext]' }
}
},
//字体加载 blueprint
{
test: /\.(woff|woff2|jpg|png)$/,
use: {
loader: 'url-loader',
options: {
name: 'fonts/[contenthash].[ext]',
limit: 5000,
mimetype: 'application/font-woff'
}
}
},
{
test: /\.(glsl|vs|fs)$/,
loader: 'shader-loader'
}
]
},
plugins: [
]
}
};
export default config;

View File

@@ -1,7 +1,7 @@
import HtmlWebPackPlugin from "html-webpack-plugin";
import * as webpack from 'webpack';
import merge from 'webpack-merge';
import common from './webpack.common';
import HtmlWebPackPlugin from "html-webpack-plugin";
const config: webpack.Configuration = merge(
common,
@@ -11,12 +11,14 @@ const config: webpack.Configuration = merge(
output: { pathinfo: false },
devtool: "eval-source-map",
devServer: {
contentBase: "./dist/",
// contentBase: "./dist/",
static: false,
port: 7776,
host: "0.0.0.0",
hot: true,
},
plugins: [
new webpack.NamedModulesPlugin(),//Hot
// new webpack.NamedModulesPlugin(),//Hot
new webpack.HotModuleReplacementPlugin(),//Hot
new HtmlWebPackPlugin({
title: "webCAD",