1
0
mirror of synced 2025-12-19 18:10:59 -05:00

remove inter fonts, copy-webpack-plugin

This commit is contained in:
Ramya Parimi
2021-08-05 20:15:52 -05:00
parent 74f54cef3c
commit 306751cd62
5 changed files with 177 additions and 278 deletions

1
.gitignore vendored
View File

@@ -6,7 +6,6 @@ npm-debug.log
coverage/
.linkinator
/assets/images/early-access
/assets/fonts/inter
/content/early-access
/data/early-access
.next

View File

@@ -3,28 +3,28 @@
const fs = require('fs')
const frontmatter = require('gray-matter')
const CopyWebpackPlugin = require('copy-webpack-plugin')
// const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require('path')
const homepage = path.posix.join(process.cwd(), 'content/index.md')
const { data } = frontmatter(fs.readFileSync(homepage, 'utf8'))
const productIds = data.children
module.exports = {
webpack: (config, { isServer }) => {
if (isServer) {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: path.join(__dirname, 'node_modules/@primer/css/fonts'),
to: path.join(__dirname, 'assets/fonts/inter'),
},
],
})
)
}
return config
},
// webpack: (config, { isServer }) => {
// if (isServer) {
// config.plugins.push(
// new CopyWebpackPlugin({
// patterns: [
// {
// from: path.join(__dirname, 'node_modules/@primer/css/fonts'),
// to: path.join(__dirname, 'assets/fonts/inter'),
// },
// ],
// })
// )
// }
// return config
// },
// speed up production `next build` by ignoring typechecking during that step of build.
// type-checking still occurs in the Dockerfile build
typescript: {

413
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,6 @@
"connect-datadog": "0.0.9",
"connect-slashes": "^1.4.0",
"cookie-parser": "^1.4.5",
"copy-webpack-plugin": "^9.0.1",
"cors": "^2.8.5",
"csurf": "^1.11.0",
"dayjs": "^1.10.6",

View File

@@ -856,14 +856,6 @@ describe('GitHub Desktop URLs', () => {
})
})
describe('static assets', () => {
test('fonts', async () => {
expect((await get('/assets/fonts/inter/Inter-Bold.woff')).statusCode).toBe(200)
expect((await get('/assets/fonts/inter/Inter-Medium.woff')).statusCode).toBe(200)
expect((await get('/assets/fonts/inter/Inter-Regular.woff')).statusCode).toBe(200)
})
})
describe('extended Markdown', () => {
test('renders styled warnings', async () => {
const $ = await getDOM('/en/articles/removing-a-remote')