添加包

This commit is contained in:
2024-11-28 18:00:58 +08:00
parent 82e2c29937
commit 4b7957256e
11 changed files with 1225 additions and 47 deletions

View File

@ -27,6 +27,7 @@ export default defineConfig({
offscreen: `${src}/offscreen.ts`,
sandbox: `${src}/sandbox.ts`,
popup: `${src}/pages/popup/main.tsx`,
install: `${src}/pages/install/main.tsx`,
},
output: {
path: `${dist}/ext/src`,
@ -45,6 +46,23 @@ export default defineConfig({
},
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: "postcss-loader",
options: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
},
},
],
type: "css",
},
{
test: /\.(svg|png)$/,
type: "asset",
@ -101,6 +119,14 @@ export default defineConfig({
},
],
}),
new rspack.HtmlRspackPlugin({
filename: `${dist}/ext/src/install.html`,
template: `${src}/pages/install/index.html`,
inject: "head",
title: "Install - ScriptCat",
minify: true,
chunks: ["install"],
}),
new rspack.HtmlRspackPlugin({
filename: `${dist}/ext/src/popup.html`,
template: `${src}/pages/popup/index.html`,