mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Merge pull request #3 from zeit/fix/next-dev
Fixes next dev and adds the css requires
This commit is contained in:
commit
83c19b256a
|
@ -3,7 +3,7 @@
|
|||
import { resolve } from 'path'
|
||||
import parseArgs from 'minimist'
|
||||
import Server from '../server'
|
||||
import build from '../server/build'
|
||||
import build from '../server/build/index'
|
||||
|
||||
const argv = parseArgs(process.argv.slice(2), {
|
||||
alias: {
|
||||
|
|
|
@ -2,12 +2,14 @@ import React from 'react'
|
|||
import ReactDOM from 'react-dom'
|
||||
import App from '../lib/app'
|
||||
import Link from '../lib/link'
|
||||
import Css from '../lib/css'
|
||||
|
||||
const modules = new Map([
|
||||
['react', React],
|
||||
['react-dom', ReactDOM],
|
||||
['next/app', App],
|
||||
['next/link', Link]
|
||||
['next/link', Link],
|
||||
['next/css', Css]
|
||||
])
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,8 @@ export default function bundle (src, dst) {
|
|||
'react-dom',
|
||||
{
|
||||
[require.resolve('react')]: 'react',
|
||||
[require.resolve('../lib/link')]: 'next/link'
|
||||
[require.resolve('../../lib/link')]: 'next/link',
|
||||
[require.resolve('../../lib/css')]: 'next/css'
|
||||
}
|
||||
],
|
||||
resolveLoader: {
|
||||
|
|
|
@ -25,7 +25,8 @@ const babelOptions = {
|
|||
[
|
||||
{ src: `npm:${babelRuntimePath}`, expose: 'babel-runtime' },
|
||||
{ src: `npm:${require.resolve('react')}`, expose: 'react' },
|
||||
{ src: `npm:${require.resolve('../lib/link')}`, expose: 'next/link' }
|
||||
{ src: `npm:${require.resolve('../../lib/link')}`, expose: 'next/link' },
|
||||
{ src: `npm:${require.resolve('../../lib/css')}`, expose: 'next/css' }
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue