1 Star 1 Fork 0

黑黑哈哈/react-components-message

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
黑黑哈哈 提交于 2021-05-13 16:32 . 增加组件
/*
* @Description:
* @version: 1.0.0
* @Author: chenhong
* @Date: 2021-05-12 15:08:05
* @LastEditors: chenhong
* @LastEditTime: 2021-05-12 16:20:15
*/
const path = require("path");
const webpack = require("webpack");
module.exports = {
entry: "./src/index.js",
mode: "development",
resolve: {extensions: [".ts", ".tsx", "*", ".js", ".jsx"]},
module: {
rules: [
// All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
{test: /\.tsx?$/, loader: "awesome-typescript-loader"},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
// {enforce: "pre", test: /\.js$/, loader: "source-map-loader"},
{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components)/,
loader: "babel-loader",
options: {presets: ["@babel/env"]},
},
{
test: /\.css$|\.less$/,
use: ["style-loader", "css-loader", "less-loader"],
},
],
},
output: {
path: path.resolve(__dirname, "dist/"),
publicPath: "/dist/",
filename: "bundle.js",
},
devServer: {
contentBase: path.join(__dirname, "public/"),
port: 3000,
publicPath: "http://localhost:3000/dist/",
hotOnly: true,
},
plugins: [new webpack.HotModuleReplacementPlugin()],
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/rainbowChenhong/react-components-message.git
git@gitee.com:rainbowChenhong/react-components-message.git
rainbowChenhong
react-components-message
react-components-message
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385