2018-03-16 19:11:24 +00:00
|
|
|
import path from 'path'
|
2018-03-22 21:21:17 +00:00
|
|
|
import os from 'os'
|
|
|
|
|
2018-03-20 22:11:30 +00:00
|
|
|
import isCI from 'is-ci'
|
2018-03-16 17:23:15 +00:00
|
|
|
|
|
|
|
export default {
|
2018-03-20 22:11:30 +00:00
|
|
|
// Information about running environment
|
2018-03-16 17:23:15 +00:00
|
|
|
dev: process.env.NODE_ENV !== 'production',
|
2018-03-21 06:29:18 +00:00
|
|
|
production: process.env.NODE_ENV === 'production',
|
2018-03-21 06:20:14 +00:00
|
|
|
debug: undefined, // = dev
|
2018-03-18 08:51:56 +00:00
|
|
|
test: process.env.NODE_ENV === 'test',
|
2018-03-20 22:11:30 +00:00
|
|
|
ci: Boolean(isCI),
|
2018-03-21 06:29:18 +00:00
|
|
|
minimalCLI: undefined, // = ci || test || production
|
2018-03-20 22:11:30 +00:00
|
|
|
|
|
|
|
// Mode
|
|
|
|
mode: 'universal',
|
|
|
|
|
|
|
|
// Dirs
|
2018-03-16 17:23:15 +00:00
|
|
|
buildDir: '.nuxt',
|
|
|
|
cacheDir: '.cache',
|
2018-03-16 19:11:24 +00:00
|
|
|
nuxtDir: path.resolve(__dirname, '../..'),
|
|
|
|
nuxtAppDir: path.resolve(__dirname, '../app'),
|
2018-03-16 17:23:15 +00:00
|
|
|
modulesDir: ['node_modules'], // ~> relative to options.rootDir
|
2018-03-20 22:11:30 +00:00
|
|
|
|
|
|
|
// Ignore
|
2018-03-16 17:23:15 +00:00
|
|
|
ignorePrefix: '-',
|
|
|
|
ignore: [
|
|
|
|
'**/*.test.*'
|
|
|
|
],
|
2018-03-20 22:11:30 +00:00
|
|
|
|
2018-03-16 17:23:15 +00:00
|
|
|
extensions: [],
|
2018-03-20 22:11:30 +00:00
|
|
|
|
2018-03-16 17:23:15 +00:00
|
|
|
build: {
|
|
|
|
analyze: false,
|
|
|
|
profile: process.argv.includes('--profile'),
|
|
|
|
maxChunkSize: false,
|
|
|
|
extractCSS: false,
|
|
|
|
cssSourceMap: undefined,
|
|
|
|
ssr: undefined,
|
2018-03-22 21:21:17 +00:00
|
|
|
parallel: os.cpus().length > 1,
|
|
|
|
cache: true,
|
2018-03-16 17:23:15 +00:00
|
|
|
publicPath: '/_nuxt/',
|
|
|
|
filenames: {
|
|
|
|
app: '[name].[chunkhash].js',
|
2018-03-17 10:31:47 +00:00
|
|
|
chunk: '[name].[chunkhash].js',
|
2018-03-21 10:16:03 +00:00
|
|
|
// TODO: Use [name].[contenthash].css when webpack core supports [contenthash]
|
|
|
|
// https://github.com/webpack-contrib/mini-css-extract-plugin/pull/30#issuecomment-374700690
|
|
|
|
css: '[name].[chunkhash].css'
|
2018-03-16 17:23:15 +00:00
|
|
|
},
|
|
|
|
styleResources: {},
|
|
|
|
plugins: [],
|
2018-03-19 18:40:33 +00:00
|
|
|
optimization: {
|
|
|
|
splitChunks: {
|
|
|
|
chunks: 'all',
|
|
|
|
cacheGroups: {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
splitChunks: {
|
2018-03-21 10:03:57 +00:00
|
|
|
layouts: false,
|
2018-03-19 18:40:33 +00:00
|
|
|
pages: true,
|
2018-03-21 10:03:57 +00:00
|
|
|
commons: true
|
2018-03-19 18:40:33 +00:00
|
|
|
},
|
2018-03-16 17:23:15 +00:00
|
|
|
babel: {
|
|
|
|
babelrc: false
|
|
|
|
},
|
2018-03-22 09:11:16 +00:00
|
|
|
vue: {
|
|
|
|
template: {
|
|
|
|
doctype: 'html' // For pug, see https://github.com/vuejs/vue-loader/issues/55
|
|
|
|
},
|
|
|
|
transformAssetUrls: {
|
|
|
|
video: 'src',
|
|
|
|
source: 'src',
|
|
|
|
object: 'src',
|
|
|
|
embed: 'src'
|
|
|
|
}
|
|
|
|
},
|
2018-03-16 17:23:15 +00:00
|
|
|
postcss: {},
|
|
|
|
templates: [],
|
|
|
|
watch: [],
|
|
|
|
devMiddleware: {},
|
|
|
|
hotMiddleware: {},
|
|
|
|
stats: {
|
|
|
|
chunks: false,
|
|
|
|
children: false,
|
|
|
|
modules: false,
|
|
|
|
colors: true,
|
2018-03-22 10:23:11 +00:00
|
|
|
// Warning and Erros will be handled by friendly-errors-plugin
|
|
|
|
warnings: false,
|
|
|
|
errors: false,
|
2018-03-16 17:23:15 +00:00
|
|
|
excludeAssets: [
|
|
|
|
/.map$/,
|
|
|
|
/index\..+\.html$/,
|
|
|
|
/vue-ssr-client-manifest.json/
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
generate: {
|
|
|
|
dir: 'dist',
|
|
|
|
routes: [],
|
|
|
|
concurrency: 500,
|
|
|
|
interval: 0,
|
|
|
|
subFolders: true,
|
|
|
|
fallback: '200.html',
|
|
|
|
minify: {
|
|
|
|
collapseBooleanAttributes: true,
|
|
|
|
collapseWhitespace: false,
|
|
|
|
decodeEntities: true,
|
|
|
|
minifyCSS: true,
|
|
|
|
minifyJS: true,
|
|
|
|
processConditionalComments: true,
|
|
|
|
removeAttributeQuotes: false,
|
|
|
|
removeComments: false,
|
|
|
|
removeEmptyAttributes: true,
|
|
|
|
removeOptionalTags: true,
|
|
|
|
removeRedundantAttributes: true,
|
|
|
|
removeScriptTypeAttributes: false,
|
|
|
|
removeStyleLinkTypeAttributes: false,
|
|
|
|
removeTagWhitespace: false,
|
|
|
|
sortAttributes: true,
|
|
|
|
sortClassName: false,
|
|
|
|
trimCustomFragments: true,
|
|
|
|
useShortDoctype: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
env: {},
|
|
|
|
head: {
|
|
|
|
meta: [],
|
|
|
|
link: [],
|
|
|
|
style: [],
|
|
|
|
script: []
|
|
|
|
},
|
|
|
|
plugins: [],
|
|
|
|
css: [],
|
|
|
|
modules: [],
|
|
|
|
layouts: {},
|
|
|
|
serverMiddleware: [],
|
|
|
|
ErrorPage: null,
|
|
|
|
loading: {
|
|
|
|
color: 'black',
|
|
|
|
failedColor: 'red',
|
|
|
|
height: '2px',
|
|
|
|
duration: 5000,
|
|
|
|
rtl: false
|
|
|
|
},
|
2018-03-20 09:13:36 +00:00
|
|
|
loadingIndicator: false,
|
2018-03-16 17:23:15 +00:00
|
|
|
transition: {
|
|
|
|
name: 'page',
|
|
|
|
mode: 'out-in',
|
|
|
|
appear: false,
|
|
|
|
appearClass: 'appear',
|
|
|
|
appearActiveClass: 'appear-active',
|
|
|
|
appearToClass: 'appear-to'
|
|
|
|
},
|
|
|
|
layoutTransition: {
|
|
|
|
name: 'layout',
|
|
|
|
mode: 'out-in'
|
|
|
|
},
|
|
|
|
dir: {
|
|
|
|
assets: 'assets',
|
|
|
|
layouts: 'layouts',
|
|
|
|
middleware: 'middleware',
|
|
|
|
pages: 'pages',
|
|
|
|
static: 'static',
|
|
|
|
store: 'store'
|
|
|
|
},
|
|
|
|
router: {
|
|
|
|
mode: 'history',
|
|
|
|
base: '/',
|
|
|
|
routes: [],
|
|
|
|
middleware: [],
|
|
|
|
linkActiveClass: 'nuxt-link-active',
|
|
|
|
linkExactActiveClass: 'nuxt-link-exact-active',
|
|
|
|
extendRoutes: null,
|
|
|
|
scrollBehavior: null,
|
|
|
|
parseQuery: false,
|
|
|
|
stringifyQuery: false,
|
|
|
|
fallback: false
|
|
|
|
},
|
|
|
|
render: {
|
2018-03-20 08:25:46 +00:00
|
|
|
bundleRenderer: {
|
|
|
|
shouldPrefetch: () => false
|
|
|
|
},
|
2018-03-20 10:36:06 +00:00
|
|
|
resourceHints: undefined,
|
2018-03-16 17:23:15 +00:00
|
|
|
ssr: undefined,
|
|
|
|
http2: {
|
|
|
|
push: false,
|
|
|
|
shouldPush: null
|
|
|
|
},
|
|
|
|
static: {
|
|
|
|
prefix: true
|
|
|
|
},
|
|
|
|
gzip: {
|
|
|
|
threshold: 0
|
|
|
|
},
|
|
|
|
etag: {
|
|
|
|
weak: false
|
|
|
|
},
|
|
|
|
csp: {
|
|
|
|
enabled: false,
|
|
|
|
hashAlgorithm: 'sha256',
|
|
|
|
allowedSources: undefined,
|
|
|
|
policies: undefined
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watchers: {
|
|
|
|
webpack: {},
|
|
|
|
chokidar: {}
|
|
|
|
},
|
|
|
|
editor: undefined,
|
|
|
|
hooks: null,
|
|
|
|
messages: {
|
|
|
|
error_404: 'This page could not be found',
|
|
|
|
server_error: 'Server error',
|
|
|
|
nuxtjs: 'Nuxt.js',
|
|
|
|
back_to_home: 'Back to the home page',
|
|
|
|
server_error_details:
|
|
|
|
'An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.',
|
|
|
|
client_error: 'Error',
|
|
|
|
client_error_details:
|
|
|
|
'An error occurred while rendering the page. Check developer tools console for details.'
|
|
|
|
}
|
|
|
|
}
|