kissu
kissu
NNuxt
Created by kissu on 9/22/2024 in #❓・help
How to access the entry.js file ala Vue3?
I do have a successful config with a Vu3 app with the following
export default defineConfig(({ mode }) => {
return {
plugins: [vue()],

build: {
outDir: '../../public/dist',
emptyOutDir: true,
manifest: true,

rollupOptions: {
input: path.resolve(__dirname, 'src/main.js'),
}
},

server: {
strictPort: true,
port: 5133,
hmr: {
host: 'localhost'
}
},
}
})
export default defineConfig(({ mode }) => {
return {
plugins: [vue()],

build: {
outDir: '../../public/dist',
emptyOutDir: true,
manifest: true,

rollupOptions: {
input: path.resolve(__dirname, 'src/main.js'),
}
},

server: {
strictPort: true,
port: 5133,
hmr: {
host: 'localhost'
}
},
}
})
This allows me to access the output of the Vue project from a PHP app thanks to the following endpoint http://localhost:5133/main.js --- In the Nuxt3 app, the entry point should be: http://localhost:5233/_nuxt/entry.js AFAIK But I only have a 404 when visiting that one This is the config of the Nuxt3 app
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
ssr: false,

devServer: {
port: 5233,
host: 'localhost',
},

vite: {
server: {
strictPort: true,
hmr: {
host: 'localhost'
}
}
},
})
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
ssr: false,

devServer: {
port: 5233,
host: 'localhost',
},

vite: {
server: {
strictPort: true,
hmr: {
host: 'localhost'
}
}
},
})
PS: the local app runs well if accessed directly (hence only the Nuxt app) and the HMR script is also loaded properly from http://localhost:5233/_nuxt/@vite/client inside of the PHP app I am mostly not sure if I'm missing some kind of additional config or using the wrong endpoint for the entry.js file. 🤔
13 replies
NNuxt
Created by kissu on 11/25/2022 in #❓・help
globalThis.__publicAssetsURL is not a function
Hey! 👋🏻 I don't have the issue myself (so no repro 😦 ) but asking for several people with the following issue: https://github.com/nuxt/framework/discussions/6784#discussioncomment-4235431 Is it a breaking change or something deprecated that people may be using? 🤔
1 replies