1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/stringify-gitee-helper

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
webpack.config.js 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
衣沾不足惜 Отправлено 19.01.2022 15:52 6e46adc
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
}
};

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/stringify-gitee-helper.git
git@api.gitlife.ru:oschina-mirror/stringify-gitee-helper.git
oschina-mirror
stringify-gitee-helper
stringify-gitee-helper
master