Skip to content

Commit

Permalink
fix: remove @ampproject/toolbox-optimizer from package dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Huang committed Oct 29, 2020
1 parent 9df94d9 commit 9ff127d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 86 deletions.
96 changes: 15 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"author": "danhuang",
"license": "ISC",
"dependencies": {
"@ampproject/toolbox-optimizer": "^1.1.2",
"@babel/types": "^7.6.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
Expand Down
4 changes: 0 additions & 4 deletions src/utils/express.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { renderToStaticMarkup } from 'react-dom/server'
// import AmpOptimizer from '@ampproject/toolbox-optimizer'
import { RequestHandler } from 'express'
import Html, { Props } from '../components/Html'

Expand All @@ -11,9 +10,6 @@ async function renderToAmpHtml({ res, head, main, styles, asset }) {
<Html head={head} main={main} asset={asset} styles={styles} />
)

// const optimizer = AmpOptimizer.create()
// html = await optimizer.transformHtml(html)

if (!res.getHeader('Content-Type')) {
res.setHeader('Content-Type', 'text/html; charset=utf-8')
}
Expand Down

0 comments on commit 9ff127d

Please sign in to comment.