remove inter fonts, copy-webpack-plugin
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,7 +6,6 @@ npm-debug.log
|
||||
coverage/
|
||||
.linkinator
|
||||
/assets/images/early-access
|
||||
/assets/fonts/inter
|
||||
/content/early-access
|
||||
/data/early-access
|
||||
.next
|
||||
|
||||
@@ -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
413
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user