mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Improved with-ant-design example (#4034)
* Improved with-ant-design example * standardjs fix maybe
This commit is contained in:
parent
9470b91ba1
commit
a6af11c6ae
|
@ -6,7 +6,7 @@
|
|||
"import",
|
||||
{
|
||||
"libraryName": "antd",
|
||||
"style": false
|
||||
"style": "css"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -4,7 +4,7 @@ export default ({ children }) =>
|
|||
<Head>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
||||
<meta charSet='utf-8' />
|
||||
<link rel='stylesheet' href='https://unpkg.com/antd@3/dist/antd.min.css' />
|
||||
<link rel='stylesheet' href='/_next/static/style.css' />
|
||||
</Head>
|
||||
<style jsx global>{`
|
||||
body {
|
||||
|
|
8
examples/with-ant-design/next.config.js
Normal file
8
examples/with-ant-design/next.config.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
const withCss = require('@zeit/next-css')
|
||||
|
||||
// fix: prevents error when .css files are required by node
|
||||
if (typeof require !== 'undefined') {
|
||||
require.extensions['.css'] = (file) => {}
|
||||
}
|
||||
|
||||
module.exports = withCss()
|
|
@ -7,7 +7,8 @@
|
|||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"antd": "^3.0.2",
|
||||
"@zeit/next-css": "^0.1.4",
|
||||
"antd": "^3.3.1",
|
||||
"babel-plugin-import": "^1.1.1",
|
||||
"next": "latest",
|
||||
"react": "^16.0.0",
|
||||
|
|
Loading…
Reference in a new issue