You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove traces of glamor
As talked about with @rauchg. Glamor takes up around 60KB of the bundle (pre-gzip). Since styled-jsx is the way to go now and we support adding glamor by the user we should remove it as dependency cause it is bundled even when not used.
Added rehydration to the example, since we did that in our code.
There is only one thing I'm not sure about and want to discuss:
what should we do with next/css. Right now I added a throw for when it is imported. I'm not sure if we should do that / some other way to notify the user it has been removed. The reasoning behind the throw is that when we would do a console.warn the user would see 'css.default.<X>' not found because we don't have the glamor dependency anymore.
* Update yarn.lock
* Remove test for styles
css[k]=deprecated(v,'Warning: \'next/css\' is deprecated. Please refer to the migration guide: https://github.com/zeit/next.js/wiki/Migrating-from-next-css')
9
-
}
10
-
}
11
-
12
-
/**
13
-
* Expose style as default and the whole object as properties
14
-
* so it can be used as follows:
15
-
*
16
-
* import css, { merge } from 'next/css'
17
-
* css({ color: 'red' })
18
-
* merge({ color: 'green' })
19
-
* css.merge({ color: 'blue' })
20
-
*/
21
-
22
-
css.default=css.style
23
-
Object.keys(css).forEach(key=>{
24
-
if(key!=='default'){
25
-
css.default[key]=css[key]
26
-
}
27
-
})
28
-
29
-
module.exports=css
1
+
thrownewError(`'next/css' has been removed in Next.js 2.0. Please refer to the migration guide: https://github.com/zeit/next.js/wiki/Migrating-from-next-css`)
0 commit comments