Skip to content

Commit 5f27b51

Browse files
committed
Remove fragile css minifier for now
1 parent 0a2831e commit 5f27b51

File tree

5 files changed

+23
-114
lines changed

5 files changed

+23
-114
lines changed

build-plugins/css-minifier.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

site/next.config.mjs

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import rehypeSlug from 'rehype-slug';
22
import remarkGfm from 'remark-gfm';
33
import nextMdx from '@next/mdx';
4-
import withPlugins from 'next-compose-plugins';
54

65
const withMDX = nextMdx({
76
extension: /\.mdx?$/,
@@ -12,42 +11,28 @@ const withMDX = nextMdx({
1211
},
1312
});
1413

15-
const withSvgr = (nextConfig = {}, nextComposePlugins = {}) => {
16-
return Object.assign({}, nextConfig, {
17-
webpack(config, options) {
18-
config.module.rules.push({
19-
test: /.svg$/,
20-
use: ['@svgr/webpack'],
21-
});
22-
23-
if (typeof nextConfig.webpack === 'function') {
24-
return nextConfig.webpack(config, options);
25-
}
26-
27-
return config;
28-
},
29-
});
14+
/** @type {import('next').NextConfig} */
15+
const nextConfig = {
16+
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
17+
webpack(config) {
18+
config.module.rules.push({
19+
test: /\.svg$/,
20+
use: ['@svgr/webpack'],
21+
});
22+
return config;
23+
},
24+
async rewrites() {
25+
return [
26+
{
27+
source: '/bee.js',
28+
destination: 'https://cdn.splitbee.io/sb.js',
29+
},
30+
{
31+
source: '/_hive/:slug',
32+
destination: 'https://hive.splitbee.io/:slug',
33+
},
34+
];
35+
},
3036
};
3137

32-
export default withPlugins(
33-
[
34-
withMDX({
35-
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
36-
}),
37-
withSvgr,
38-
],
39-
{
40-
rewrites() {
41-
return [
42-
{
43-
source: '/bee.js',
44-
destination: 'https://cdn.splitbee.io/sb.js',
45-
},
46-
{
47-
source: '/_hive/:slug',
48-
destination: 'https://hive.splitbee.io/:slug',
49-
},
50-
];
51-
},
52-
}
53-
);
38+
export default withMDX(nextConfig);

site/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@types/react": "^18.3.18",
2929
"@types/react-dom": "^18.3.5",
3030
"autoprefixer": "^10.4.20",
31-
"next-compose-plugins": "^2.2.1",
3231
"remark-gfm": "^3.0.1",
3332
"tailwindcss": "^3.4.17",
3433
"typescript": "^4.9.5"

site/pnpm-lock.yaml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsup.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { defineConfig, Options } from 'tsup';
22
import { minifyTemplates, writeFiles } from 'esbuild-minify-templates';
3-
import { cssMinifierPlugin } from './build-plugins/css-minifier';
43

54
const commonConfig: Options = {
65
minify: true,
@@ -11,7 +10,6 @@ const commonConfig: Options = {
1110
write: false,
1211
esbuildPlugins: [
1312
minifyTemplates({ taggedOnly: false }),
14-
cssMinifierPlugin(),
1513
writeFiles(),
1614
],
1715
};

0 commit comments

Comments
 (0)