mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-08 16:16:09 +00:00
Do a bit more configuration for nuxt, set server = 'static'
This commit is contained in:
18
dist/index.js
vendored
18
dist/index.js
vendored
@@ -14468,7 +14468,7 @@ class ConfigParser {
|
||||
|
||||
// If the configuration file does not exist, initialize it with the blank configuration file
|
||||
if (!fs.existsSync(this.configurationFile)) {
|
||||
core.info('Use default blank configuration')
|
||||
core.info('Using default blank configuration')
|
||||
const blankConfiguration = fs.readFileSync(blankConfigurationFile, 'utf8')
|
||||
fs.writeFileSync(this.configurationFile, blankConfiguration, {
|
||||
encoding: 'utf8'
|
||||
@@ -14476,7 +14476,6 @@ class ConfigParser {
|
||||
}
|
||||
|
||||
// Read the configuration file
|
||||
core.info('Read existing configuration')
|
||||
this.configuration = fs.readFileSync(this.configurationFile, 'utf8')
|
||||
}
|
||||
|
||||
@@ -14592,7 +14591,8 @@ class ConfigParser {
|
||||
// - propertyValue: the value of the property
|
||||
inject(propertyName, propertyValue) {
|
||||
// Logging
|
||||
core.info(`Parsing configuration:\n${this.configuration}`)
|
||||
core.info(`Injecting property=${propertyName} and value=${propertyValue} in:`)
|
||||
core.info(this.configuration)
|
||||
|
||||
// Parse the AST out of the configuration file
|
||||
const espreeOptions = {
|
||||
@@ -14693,7 +14693,8 @@ class ConfigParser {
|
||||
}
|
||||
|
||||
// Logging
|
||||
core.info(`Writing new configuration:\n${this.configuration}`)
|
||||
core.info(`Injection successful, new configuration:`)
|
||||
core.info(this.configuration)
|
||||
|
||||
// Finally write the new configuration in the file
|
||||
fs.writeFileSync(this.configurationFile, this.configuration, {
|
||||
@@ -14836,7 +14837,12 @@ function getConfigParserSettings(staticSiteGenerator, path) {
|
||||
configurationFile: './nuxt.config.js',
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "nuxt.js",
|
||||
properties: {
|
||||
'router.base': path
|
||||
// Configure a base path on the router
|
||||
'router.base': path,
|
||||
|
||||
// Set the target to static too
|
||||
// https://nuxtjs.org/docs/configuration-glossary/configuration-target/
|
||||
server: 'static'
|
||||
}
|
||||
}
|
||||
case 'next':
|
||||
@@ -14849,6 +14855,7 @@ function getConfigParserSettings(staticSiteGenerator, path) {
|
||||
configurationFile: './next.config.js',
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "next.js",
|
||||
properties: {
|
||||
// Configure a base path
|
||||
basePath: path,
|
||||
|
||||
// Disable server side image optimization too
|
||||
@@ -14861,6 +14868,7 @@ function getConfigParserSettings(staticSiteGenerator, path) {
|
||||
configurationFile: './gatsby-config.js',
|
||||
blankConfigurationFile: __nccwpck_require__.ab + "gatsby.js",
|
||||
properties: {
|
||||
// Configure a path prefix
|
||||
pathPrefix: path
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user