explicitly set outName in targets to avoid regression

This commit is contained in:
Pooya Parsa 2020-11-11 15:27:08 +01:00
parent 35720380c2
commit b258c2af2c
5 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@ if ('serviceWorker' in navigator) {
return { return {
entry: '{{ runtimeDir }}/targets/service-worker', entry: '{{ runtimeDir }}/targets/service-worker',
targetDir: '{{ publicDir }}', targetDir: '{{ publicDir }}',
outName: '_nuxt.js',
nuxtHooks: { nuxtHooks: {
'vue-renderer:ssr:templateParams' (params) { 'vue-renderer:ssr:templateParams' (params) {
params.APP += script params.APP += script

View File

@ -6,6 +6,7 @@ import { worker } from './worker'
export const cloudflare: SLSTarget = extendTarget(worker, { export const cloudflare: SLSTarget = extendTarget(worker, {
entry: '{{ runtimeDir }}/targets/cloudflare', entry: '{{ runtimeDir }}/targets/cloudflare',
outName: '_nuxt.js',
generateIgnore: [ generateIgnore: [
'wrangler.toml' 'wrangler.toml'
], ],

View File

@ -5,6 +5,7 @@ import { SLSTarget } from '../config'
export const lambda: SLSTarget = { export const lambda: SLSTarget = {
entry: '{{ runtimeDir }}/targets/lambda', entry: '{{ runtimeDir }}/targets/lambda',
outName: '_nuxt.js',
hooks: { hooks: {
'done' ({ rollupConfig }) { 'done' ({ rollupConfig }) {
const entry = relative(process.cwd(), rollupConfig.output.file).replace(/\.js$/, '') const entry = relative(process.cwd(), rollupConfig.output.file).replace(/\.js$/, '')

View File

@ -3,6 +3,7 @@ import { SLSTarget } from '../config'
import { lambda } from './lambda' import { lambda } from './lambda'
export const netlify: SLSTarget = extendTarget(lambda, { export const netlify: SLSTarget = extendTarget(lambda, {
outName: '_nuxt.js',
generateIgnore: [ generateIgnore: [
'netlify.toml', 'netlify.toml',
'_redirects' '_redirects'

View File

@ -4,9 +4,12 @@ import { SLSTarget } from '../config'
export const node: SLSTarget = { export const node: SLSTarget = {
entry: '{{ runtimeDir }}/targets/node', entry: '{{ runtimeDir }}/targets/node',
outName: 'index.js',
hooks: { hooks: {
'done' ({ rollupConfig }) { 'done' ({ rollupConfig }) {
const entry = relative(process.cwd(), rollupConfig.output.file).replace(/\.js$/, '') const entry = relative(process.cwd(), rollupConfig.output.file)
.replace(/\.js$/, '')
.replace(/\/index$/, '')
consola.info(`Ready to deploy node entrypoint: \`${entry}\``) consola.info(`Ready to deploy node entrypoint: \`${entry}\``)
consola.info(`You can try using \`node ${entry} [path]\``) consola.info(`You can try using \`node ${entry} [path]\``)
} }