1 Star 0 Fork 10

金缕羽/gitee 助手

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
mode: "production", // development
entry: {
"./background": "./js/background.js",
"./js/insert-community": "./js/insert-community.js",
"./js/popup": "./js/popup.js"
},
devtool: "inline-source-map",
output: {
// "[name].[hash].bundle.js"
filename: "[name].js",
path: path.resolve(__dirname, "dist"),
publicPath: "/",
clean: true
},
module: {
rules: [
{
test: /\.css$/,
use: [
// "style-loader", //将js中的css通过style方式注入到html中
"css-loader" // 加载处理css文件
]
}
]
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: "manifest.json" },
{ from: "img/", to: "img/", toType: "dir" },
{ from: "html", to: "html", toType: "dir" },
{ from: "css", to: "css", toType: "dir" },
{ from: "node_modules/chrome-extension-file-icons-js/css/style.css", to: "css/file-icon.css" },
{ from: "node_modules/chrome-extension-file-icons-js/fonts/", to: "fonts/", toType: "dir" }
]
})
],
devServer: {
static: "./dist", // 告知 dev server,从什么位置查找静态文件
compress: true,
port: 9000,
host: "0.0.0.0",
hot: true
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jinlvyu/gitee-helper.git
git@gitee.com:jinlvyu/gitee-helper.git
jinlvyu
gitee-helper
gitee 助手
master

搜索帮助