2018-03-16 16:12:06 +00:00
|
|
|
import path from 'path'
|
2018-09-08 20:18:14 +00:00
|
|
|
import compression from 'compression'
|
2017-11-20 04:22:30 +00:00
|
|
|
|
2018-03-16 16:12:06 +00:00
|
|
|
export default {
|
2018-11-11 11:21:53 +00:00
|
|
|
mode: 'unknown',
|
2017-05-21 17:18:26 +00:00
|
|
|
srcDir: __dirname,
|
2018-08-12 14:26:30 +00:00
|
|
|
server: {
|
|
|
|
port: 8000,
|
|
|
|
host: '0.0.0.0'
|
|
|
|
},
|
2016-12-21 14:03:37 +00:00
|
|
|
router: {
|
2017-01-19 15:26:30 +00:00
|
|
|
base: '/test/',
|
2017-05-21 17:18:26 +00:00
|
|
|
middleware: 'noop',
|
2017-10-31 13:26:19 +00:00
|
|
|
extendRoutes(routes) {
|
2017-08-21 20:01:41 +00:00
|
|
|
return [
|
|
|
|
...routes,
|
|
|
|
{
|
|
|
|
name: 'about-bis',
|
|
|
|
path: '/about-bis',
|
2018-12-04 12:19:05 +00:00
|
|
|
component: '~/pages/about.vue',
|
|
|
|
meta: { text: 'test-meta' }
|
2018-03-15 11:57:00 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/redirect/about-bis',
|
|
|
|
redirect: '/about-bis'
|
2018-08-13 16:27:20 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/not-existed'
|
2017-08-21 20:01:41 +00:00
|
|
|
}
|
|
|
|
]
|
2017-01-19 15:26:30 +00:00
|
|
|
}
|
2016-12-21 18:27:36 +00:00
|
|
|
},
|
2018-01-13 05:22:11 +00:00
|
|
|
modulesDir: [path.join(__dirname, '..', '..', '..', 'node_modules')],
|
2017-05-21 17:18:26 +00:00
|
|
|
transition: 'test',
|
2017-09-09 11:39:20 +00:00
|
|
|
layoutTransition: 'test',
|
2017-11-21 01:54:02 +00:00
|
|
|
loadingIndicator: 'circle',
|
2018-01-05 09:32:13 +00:00
|
|
|
extensions: 'ts',
|
2017-03-24 17:35:30 +00:00
|
|
|
plugins: [
|
2018-08-11 18:18:31 +00:00
|
|
|
'~/plugins/test',
|
2018-12-20 09:28:10 +00:00
|
|
|
{ src: '~/plugins/test.plugin', mode: 'abc' },
|
|
|
|
'~/plugins/test.client',
|
|
|
|
'~/plugins/test.server',
|
2017-07-06 22:27:27 +00:00
|
|
|
{ src: '~/plugins/only-client.js', ssr: false }
|
2017-03-24 17:35:30 +00:00
|
|
|
],
|
2017-07-06 22:27:27 +00:00
|
|
|
loading: '~/components/loading',
|
2016-12-21 19:51:43 +00:00
|
|
|
env: {
|
|
|
|
bool: true,
|
|
|
|
num: 23,
|
2017-09-05 09:15:01 +00:00
|
|
|
string: 'Nuxt.js',
|
|
|
|
object: {
|
2017-09-05 09:42:19 +00:00
|
|
|
bool: false,
|
2017-09-05 09:15:01 +00:00
|
|
|
string: 'ok',
|
|
|
|
num2: 8.23,
|
|
|
|
obj: {
|
|
|
|
again: true
|
|
|
|
}
|
|
|
|
}
|
2016-12-27 14:04:42 +00:00
|
|
|
},
|
2016-12-27 14:24:52 +00:00
|
|
|
build: {
|
2017-03-24 17:54:54 +00:00
|
|
|
publicPath: '/orion/',
|
2018-03-22 12:50:07 +00:00
|
|
|
cssSourceMap: true,
|
2018-04-02 12:08:31 +00:00
|
|
|
parallel: true,
|
2017-01-23 16:55:39 +00:00
|
|
|
analyze: {
|
|
|
|
analyzerMode: 'disabled',
|
2018-02-13 08:03:03 +00:00
|
|
|
generateStatsFile: true,
|
|
|
|
logLevel: 'error'
|
2017-01-23 16:55:39 +00:00
|
|
|
},
|
2017-12-08 07:39:58 +00:00
|
|
|
styleResources: {
|
2018-10-25 10:55:05 +00:00
|
|
|
css: './assets/pre-process.css'
|
2017-12-08 07:39:58 +00:00
|
|
|
},
|
2017-12-08 14:34:11 +00:00
|
|
|
babel: {
|
|
|
|
presets({ isServer }) {
|
|
|
|
return null // Coverage: Return null, so defaults will be used.
|
|
|
|
}
|
|
|
|
},
|
2018-05-06 19:29:59 +00:00
|
|
|
transpile: 'vue-test',
|
2017-10-31 13:26:19 +00:00
|
|
|
extend(config, options) {
|
2017-08-21 20:21:16 +00:00
|
|
|
return Object.assign({}, config, {
|
2018-12-10 21:34:41 +00:00
|
|
|
devtool: '#source-map'
|
2017-08-21 20:21:16 +00:00
|
|
|
})
|
2016-12-27 14:24:52 +00:00
|
|
|
}
|
2017-05-05 14:25:17 +00:00
|
|
|
},
|
2019-01-02 21:30:19 +00:00
|
|
|
css: [{ src: '~/assets/app' }],
|
2017-05-22 10:51:03 +00:00
|
|
|
render: {
|
2018-01-27 15:48:42 +00:00
|
|
|
csp: true,
|
2017-06-16 13:23:34 +00:00
|
|
|
http2: {
|
2018-01-05 09:34:52 +00:00
|
|
|
push: true,
|
|
|
|
shouldPush: (file, type) => type === 'script'
|
2017-06-16 13:23:34 +00:00
|
|
|
},
|
2017-08-30 14:18:37 +00:00
|
|
|
bundleRenderer: {
|
|
|
|
shouldPreload: (file, type) => {
|
|
|
|
return ['script', 'style', 'font'].includes(type)
|
|
|
|
}
|
|
|
|
},
|
2018-09-08 20:18:14 +00:00
|
|
|
compressor: function damn(...args) { return compression({ threshold: 9 })(...args) },
|
2017-05-22 10:51:03 +00:00
|
|
|
static: {
|
|
|
|
maxAge: '1y'
|
|
|
|
}
|
2018-10-09 12:07:23 +00:00
|
|
|
},
|
|
|
|
globalName: 'noxxt',
|
|
|
|
globals: {
|
|
|
|
id: 'custom-nuxt-id'
|
2017-05-22 10:51:03 +00:00
|
|
|
}
|
2016-12-21 14:03:37 +00:00
|
|
|
}
|