2018-06-14 17:30:14 +00:00
|
|
|
import {join} from 'path'
|
2018-02-23 13:42:06 +00:00
|
|
|
export const PHASE_EXPORT = 'phase-export'
|
|
|
|
export const PHASE_PRODUCTION_BUILD = 'phase-production-build'
|
|
|
|
export const PHASE_PRODUCTION_SERVER = 'phase-production-server'
|
|
|
|
export const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'
|
2018-03-30 13:08:09 +00:00
|
|
|
export const PAGES_MANIFEST = 'pages-manifest.json'
|
2018-04-12 07:47:42 +00:00
|
|
|
export const BUILD_MANIFEST = 'build-manifest.json'
|
2018-07-24 09:24:40 +00:00
|
|
|
export const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'
|
2018-05-31 18:56:04 +00:00
|
|
|
export const SERVER_DIRECTORY = 'server'
|
2018-06-04 09:38:46 +00:00
|
|
|
export const CONFIG_FILE = 'next.config.js'
|
2018-06-04 13:45:39 +00:00
|
|
|
export const BUILD_ID_FILE = 'BUILD_ID'
|
|
|
|
export const BLOCKED_PAGES = [
|
|
|
|
'/_document',
|
|
|
|
'/_app',
|
|
|
|
'/_error'
|
|
|
|
]
|
2018-06-14 17:30:14 +00:00
|
|
|
export const IS_BUNDLED_PAGE_REGEX = /^bundles[/\\]pages.*\.js$/
|
|
|
|
export const ROUTE_NAME_REGEX = /^bundles[/\\]pages[/\\](.*)\.js$/
|
|
|
|
export const NEXT_PROJECT_ROOT = join(__dirname, '..', '..')
|
|
|
|
export const NEXT_PROJECT_ROOT_DIST = join(NEXT_PROJECT_ROOT, 'dist')
|
|
|
|
export const NEXT_PROJECT_ROOT_NODE_MODULES = join(NEXT_PROJECT_ROOT, 'node_modules')
|
|
|
|
export const DEFAULT_PAGES_DIR = join(NEXT_PROJECT_ROOT_DIST, 'pages')
|