Skip to content

Commit 8d2923b

Browse files
authored
Merge pull request #95 from timacdonald/do-not-externalise-helpers
Do not externalise inertia helpers
2 parents a766dd5 + 2d15680 commit 8d2923b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ function noExternalInertiaHelpers(config: UserConfig): true|Array<string|RegExp>
360360
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
361361
/* @ts-ignore */
362362
const userNoExternal = (config.ssr as SSROptions|undefined)?.noExternal
363-
const pluginNoExternal = ['laravel-vite-plugin/inertia-helpers']
363+
const pluginNoExternal = ['laravel-vite-plugin']
364364

365365
if (userNoExternal === true) {
366366
return true

tests/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ describe('laravel-vite-plugin', () => {
219219

220220
const noSsrConfig = plugin.config({ build: { ssr: true } }, { command: 'build', mode: 'production' })
221221
/* @ts-ignore */
222-
expect(noSsrConfig.ssr.noExternal).toEqual(['laravel-vite-plugin/inertia-helpers'])
222+
expect(noSsrConfig.ssr.noExternal).toEqual(['laravel-vite-plugin'])
223223

224224
/* @ts-ignore */
225225
const nothingExternalConfig = plugin.config({ ssr: { noExternal: true }, build: { ssr: true } }, { command: 'build', mode: 'production' })
@@ -229,12 +229,12 @@ describe('laravel-vite-plugin', () => {
229229
/* @ts-ignore */
230230
const arrayNoExternalConfig = plugin.config({ ssr: { noExternal: ['foo'] }, build: { ssr: true } }, { command: 'build', mode: 'production' })
231231
/* @ts-ignore */
232-
expect(arrayNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin/inertia-helpers'])
232+
expect(arrayNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin'])
233233

234234
/* @ts-ignore */
235235
const stringNoExternalConfig = plugin.config({ ssr: { noExternal: 'foo' }, build: { ssr: true } }, { command: 'build', mode: 'production' })
236236
/* @ts-ignore */
237-
expect(stringNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin/inertia-helpers'])
237+
expect(stringNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin'])
238238
})
239239

240240
it('does not configure full reload when configuration it not an object', () => {

0 commit comments

Comments
 (0)