mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
fffe741986
Add stdout/stderr to console helpers Remove separate nosubfolders test file in favor of inclusion in basic.generate Add build.stats to silence webpack output Add .always to after hooks: (1) fixes issue with basic.dev test that watch.js is empty when one of the test fails and (2) fixes that sometimes when running multiple tests that failed after eachother the port is still used as the server did not automatically get killed Change all init nuxt before test to serial tests and add tests for DONE and OPEN logs
84 lines
1.5 KiB
JavaScript
84 lines
1.5 KiB
JavaScript
const path = require('path')
|
|
|
|
module.exports = {
|
|
srcDir: __dirname,
|
|
router: {
|
|
base: '/test/',
|
|
middleware: 'noop',
|
|
extendRoutes(routes) {
|
|
return [
|
|
...routes,
|
|
{
|
|
name: 'about-bis',
|
|
path: '/about-bis',
|
|
component: '~/pages/about.vue'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
modulesDir: [
|
|
path.join(__dirname, '..', '..', '..', 'node_modules')
|
|
],
|
|
transition: 'test',
|
|
layoutTransition: 'test',
|
|
loadingIndicator: 'circle',
|
|
offline: true,
|
|
plugins: [
|
|
'~/plugins/test.js',
|
|
{ src: '~/plugins/only-client.js', ssr: false }
|
|
],
|
|
loading: '~/components/loading',
|
|
env: {
|
|
bool: true,
|
|
num: 23,
|
|
string: 'Nuxt.js',
|
|
object: {
|
|
bool: false,
|
|
string: 'ok',
|
|
num2: 8.23,
|
|
obj: {
|
|
again: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
stats: false,
|
|
publicPath: '/orion/',
|
|
analyze: {
|
|
analyzerMode: 'disabled',
|
|
generateStatsFile: true
|
|
},
|
|
styleResources: {
|
|
patterns: [
|
|
'~/assets/pre-process.scss'
|
|
]
|
|
},
|
|
babel: {
|
|
presets({ isServer }) {
|
|
return null // Coverage: Return null, so defaults will be used.
|
|
}
|
|
},
|
|
extend(config, options) {
|
|
return Object.assign({}, config, {
|
|
devtool: 'nosources-source-map'
|
|
})
|
|
}
|
|
},
|
|
css: [
|
|
{ src: '~/assets/app.css' }
|
|
],
|
|
render: {
|
|
http2: {
|
|
push: true
|
|
},
|
|
bundleRenderer: {
|
|
shouldPreload: (file, type) => {
|
|
return ['script', 'style', 'font'].includes(type)
|
|
}
|
|
},
|
|
static: {
|
|
maxAge: '1y'
|
|
}
|
|
}
|
|
}
|