Skip to content

Commit

Permalink
build: 优化项目构建配置
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Oct 28, 2024
1 parent 7f68241 commit ed2eac6
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 665 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@playwright/test": "^1.47.1",
"@rsbuild/core": "^1.0.17",
"@rsbuild/plugin-less": "^1.0.2",
"@rsbuild/plugin-node-polyfill": "^1.2.0",
"@rsbuild/plugin-react": "^1.0.5",
"@types/chrome": "^0.0.279",
"@types/file-saver": "^2.0.7",
Expand All @@ -66,7 +65,6 @@
"postcss": "^8.4.47",
"postcss-loader": "^8.1.1",
"react-refresh": "^0.14.2",
"rsbuild-plugin-web-extension": "^0.0.10",
"style-loader": "^4.0.0",
"tailwindcss": "^3.4.14",
"ts-node": "^10.9.2",
Expand Down
647 changes: 0 additions & 647 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export default defineConfig({
],
},
tools: {
// postcss: {
// postcssOptions: {
// plugins: [require('tailwindcss')],
// },
// },
postcss: {
postcssOptions: {
plugins: [require('tailwindcss')],
},
},
},
});
1 change: 0 additions & 1 deletion src/api/juejin.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/content-scripts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import packageJson from '../../package.json';

// 创建影子DOM UI
createShadowRootUI({
styles: chrome.runtime.getURL('static/css/content-script.css'),
render({ root }) {
// 定义控制台输出的样式
const styles = {
Expand Down
20 changes: 10 additions & 10 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// import { getPixelUnitDefaultTheme } from '@webx-kit/rsbuild-plugin/tailwind';
import { getPixelUnitDefaultTheme } from '@webx-kit/rsbuild-plugin/tailwind';
import type { Config } from 'tailwindcss';
// import plugin from 'tailwindcss/plugin';
import plugin from 'tailwindcss/plugin';

const config: Config = {
// theme: getPixelUnitDefaultTheme(),
theme: getPixelUnitDefaultTheme(),
content: ['./src/**/*.{html,js,ts,jsx,tsx}'],
// plugins: [
// plugin(({ addUtilities }) => {
// addUtilities({
// '.flex-center': { display: 'flex', 'align-items': 'center', 'justify-content': 'center' },
// });
// }),
// ],
plugins: [
plugin(({ addUtilities }) => {
addUtilities({
'.flex-center': { display: 'flex', 'align-items': 'center', 'justify-content': 'center' },
});
}),
],
};

export default config;
4 changes: 4 additions & 0 deletions test-results/.last-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"status": "failed",
"failedTests": []
}

0 comments on commit ed2eac6

Please sign in to comment.