1
0
Fork 0
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:
Naoyuki Kanezawa 2016-10-07 08:36:21 +09:00 committed by GitHub
commit 83c19b256a
4 changed files with 8 additions and 4 deletions

View file

@ -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: {

View file

@ -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]
])
/**

View file

@ -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: {

View file

@ -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' }
]
]
],