Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental feature changes #21646

Merged
merged 56 commits into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
edabb95
Updating native-url version
janicklas-ralph Apr 4, 2020
c147099
Bump version
janicklas-ralph Apr 5, 2020
63b04ca
Merge branch 'canary' of github.com:zeit/next.js into canary
janicklas-ralph Apr 16, 2020
df52e5e
Merge branch 'canary' of github.com:zeit/next.js into canary
janicklas-ralph May 4, 2020
1baaf87
Merge branch 'canary' of github.com:zeit/next.js into canary
janicklas-ralph Aug 14, 2020
68bff2a
Merge branch 'canary' of github.com:zeit/next.js into canary
janicklas-ralph Aug 24, 2020
0aa63a4
Setup CSS optimization. Experimental inlining critical css
janicklas-ralph Aug 25, 2020
f812418
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Aug 25, 2020
42686d4
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Sep 29, 2020
90f475d
Critical CSS setup
janicklas-ralph Sep 29, 2020
6382ff2
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Sep 29, 2020
56ff05e
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 6, 2020
b728cba
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 7, 2020
2074b67
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 9, 2020
0361ac5
Enabling config override for critters. Updating critters
janicklas-ralph Oct 10, 2020
205cf62
Update critical css position
janicklas-ralph Oct 10, 2020
618ef3f
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 10, 2020
3387a7b
Fix lint error
janicklas-ralph Oct 10, 2020
9942ff6
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 12, 2020
648765c
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Oct 15, 2020
fa95198
Update critters version 0.0.6 reduced the install size
janicklas-ralph Oct 15, 2020
3d5c9b3
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 6, 2020
8a8662c
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 10, 2020
95521ee
Removing critters as a dependency
janicklas-ralph Nov 10, 2020
e327729
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 11, 2020
85214fb
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 11, 2020
527dca4
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 11, 2020
dbc456d
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 12, 2020
a367a6f
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 12, 2020
2063de9
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 17, 2020
bf1f16f
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 17, 2020
e92110c
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 17, 2020
19505b6
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 18, 2020
389980d
Fix merging
janicklas-ralph Nov 18, 2020
a1470bc
Adding critter to top level dependency
janicklas-ralph Nov 18, 2020
04aa9d2
Fixing lint
janicklas-ralph Nov 18, 2020
d3054ea
Mark package as external when not used
ijjk Nov 18, 2020
88a8c8e
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 19, 2020
bb55512
Merge branch 'css-optimization' of github.com:janicklas-ralph/next.js…
janicklas-ralph Nov 19, 2020
1aafd1a
Fix failing test case
janicklas-ralph Nov 19, 2020
65de0b5
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 20, 2020
995e1eb
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 20, 2020
1fe3de2
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 21, 2020
456b2fa
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 24, 2020
7b2006f
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 25, 2020
60fde8b
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Nov 30, 2020
060cc55
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Dec 1, 2020
ba6ef1a
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Dec 7, 2020
deb0f3d
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Jan 23, 2021
03ca0c2
Fix bug for serverless. Adding tests
janicklas-ralph Jan 23, 2021
6882f4e
Merge branch 'canary' into css-optimization
kodiakhq[bot] Jan 24, 2021
08082b5
Merge branch 'canary' into css-optimization
Timer Jan 25, 2021
bbfa4d3
Experimental feature. Added test for experimental-serverless-trace
janicklas-ralph Jan 28, 2021
d46fb57
Merge branch 'css-optimization' of github.com:janicklas-ralph/next.js…
janicklas-ralph Jan 28, 2021
8a274e1
Merge branch 'canary' of github.com:zeit/next.js into css-optimization
janicklas-ralph Jan 29, 2021
2072533
Merge branch 'canary' into css-optimization
kodiakhq[bot] Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ export default async function getBaseWebpackConfig(
config.experimental.optimizeImages
),
'process.env.__NEXT_OPTIMIZE_CSS': JSON.stringify(
!!config.experimental.optimizeCss && !dev
config.experimental.optimizeCss && !dev
),
'process.env.__NEXT_SCROLL_RESTORATION': JSON.stringify(
config.experimental.scrollRestoration
Expand Down Expand Up @@ -1202,6 +1202,7 @@ export default async function getBaseWebpackConfig(
reactMode: config.experimental.reactMode,
optimizeFonts: config.experimental.optimizeFonts,
optimizeImages: config.experimental.optimizeImages,
optimizeCss: config.experimental.optimizeCss,
scrollRestoration: config.experimental.scrollRestoration,
basePath: config.basePath,
pageEnv: config.experimental.pageEnv,
Expand Down
2 changes: 2 additions & 0 deletions packages/next/next-server/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,8 @@ export default class Server {
locale,
locales,
defaultLocale,
optimizeCss: this.renderOpts.optimizeCss,
distDir: this.distDir,
fontManifest: this.renderOpts.fontManifest,
domainLocales: this.renderOpts.domainLocales,
}
Expand Down
2 changes: 2 additions & 0 deletions test/integration/critical-css/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ export default function Home() {
</div>
)
}

Home.getInitialProps = () => ({})
18 changes: 18 additions & 0 deletions test/integration/critical-css/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,21 @@ describe('CSS optimization for serverless apps', () => {
afterAll(() => killApp(app))
runTests()
})

describe('Font optimization for emulated serverless apps', () => {
beforeAll(async () => {
await fs.writeFile(
nextConfig,
`module.exports = { target: 'experimental-serverless-trace', experimental: {optimizeCss: true} }`,
'utf8'
)
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(async () => {
await killApp(app)
await fs.remove(nextConfig)
})
runTests()
})