Commit 3621a5d5 authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

Revert "@ampproject/toolbox-optimizer"

This reverts commit 4a7afb72b8c328057bd50b86de92c1abb8d8afc3.
parent 278fd54e
...@@ -4,7 +4,7 @@ export default async function optimize( ...@@ -4,7 +4,7 @@ export default async function optimize(
): Promise<string> { ): Promise<string> {
let AmpOptimizer let AmpOptimizer
try { try {
AmpOptimizer = require('next/dist/compiled/ampproject--toolbox-optimizer') AmpOptimizer = require('@ampproject/toolbox-optimizer')
} catch (_) { } catch (_) {
return html return html
} }
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
] ]
}, },
"dependencies": { "dependencies": {
"@ampproject/toolbox-optimizer": "2.0.1",
"@babel/core": "7.7.2", "@babel/core": "7.7.2",
"@babel/plugin-proposal-class-properties": "7.7.0", "@babel/plugin-proposal-class-properties": "7.7.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4", "@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
...@@ -115,7 +116,6 @@ ...@@ -115,7 +116,6 @@
"react-dom": "^16.6.0" "react-dom": "^16.6.0"
}, },
"devDependencies": { "devDependencies": {
"@ampproject/toolbox-optimizer": "2.0.1",
"@next/polyfill-nomodule": "9.3.4-canary.0", "@next/polyfill-nomodule": "9.3.4-canary.0",
"@taskr/clear": "1.1.0", "@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0", "@taskr/esnext": "1.1.0",
......
...@@ -48,16 +48,6 @@ export async function ncc_amphtml_validator(task, opts) { ...@@ -48,16 +48,6 @@ export async function ncc_amphtml_validator(task, opts) {
.target('dist/compiled/amphtml-validator') .target('dist/compiled/amphtml-validator')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
export async function ncc_ampproject__toolbox_optimizer(task, opts) {
await task
.source(
opts.src ||
relative(__dirname, require.resolve('@ampproject/toolbox-optimizer'))
)
.ncc({ packageName: '@ampproject/toolbox-optimizer', externals })
.target('dist/compiled/ampproject--toolbox-optimizer')
}
// eslint-disable-next-line camelcase
export async function ncc_arg(task, opts) { export async function ncc_arg(task, opts) {
await task await task
.source(opts.src || relative(__dirname, require.resolve('arg'))) .source(opts.src || relative(__dirname, require.resolve('arg')))
...@@ -353,7 +343,6 @@ export async function precompile(task) { ...@@ -353,7 +343,6 @@ export async function precompile(task) {
await task.parallel([ await task.parallel([
'browser_polyfills', 'browser_polyfills',
'ncc_amphtml_validator', 'ncc_amphtml_validator',
'ncc_ampproject__toolbox_optimizer',
'ncc_arg', 'ncc_arg',
'ncc_async_retry', 'ncc_async_retry',
'ncc_async_sema', 'ncc_async_sema',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment