1 Star 1 Fork 0

黑夜行/canvas-circle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
黑夜行 提交于 2021-03-04 19:01 . first commit
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin'); //打包html的插件
const CleanWebpackPlugin = require('clean-webpack-plugin'); //清楚dist文件
module.exports = {
entry: "./src/index.ts",
devtool: 'inline-source-map',
devServer: {
contentBase: "./",
hot: true
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
use: [ 'style-loader','css-loader']
},
{
test: /\.(png|svg|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
outputPath: "/images/"
}
}
]
},
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
output: {
filename: 'builde.js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
// new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
meta: { viewport: 'width=device-width, initial-scale=1,shrink-to-fit=no, user-scaleble=0' },
minify: { //去除空格换行
collapseWhitespace: true
}
}),
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/ojh496845051/canvas-circle.git
git@gitee.com:ojh496845051/canvas-circle.git
ojh496845051
canvas-circle
canvas-circle
master

搜索帮助