1 Star 0 Fork 0

出言不逊的无雨/filesync

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1004 Bytes
一键复制 编辑 原始数据 按行查看 历史
出言不逊的无雨 提交于 2024-05-22 15:03 . 重新提交
const path = require("path");
const nodeExternals = require("webpack-node-externals");
const { copyCache, deleteCache } = require("./plugins");
module.exports = [
{
entry: "./dist/client_temp/client/index.js",
output: {
path: path.resolve(__dirname, "dist/client"),
filename: "index.js",
},
mode: "production",
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
],
},
plugins: [
{
apply: (compiler) => {
compiler.hooks.beforeRun.tapPromise("CopyFilesPlugin", async () => {
await copyCache();
});
compiler.hooks.done.tapPromise("DeleteFilesPlugin", async () => {
await deleteCache();
});
},
},
],
},
{
entry: "./dist/server_temp/server/index.js",
output: {
path: path.resolve(__dirname, "dist/server"),
filename: "index.js",
},
externals: [nodeExternals()],
mode: "production",
target: "node",
},
];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/NoRainLand/filesync.git
[email protected]:NoRainLand/filesync.git
NoRainLand
filesync
filesync
main

搜索帮助