Skip to content

Commit 4703093

Browse files
committed
remove ziggy alias
1 parent 9671bd7 commit 4703093

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
5454
let resolvedConfig: ResolvedConfig
5555
const cssManifest: Manifest = {}
5656

57-
const ziggy = 'vendor/tightenco/ziggy/dist/index.es.js';
5857
const defaultAliases: Record<string, string> = {
59-
...(fs.existsSync(ziggy) ? { ziggy } : undefined),
6058
'@': '/resources/js',
6159
};
6260

tests/index.test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,30 +169,6 @@ describe('laravel-vite-plugin', () => {
169169
])
170170
})
171171

172-
it('provides an ziggy alias when installed', () => {
173-
vi.spyOn(fs, 'existsSync').mockReturnValueOnce(true)
174-
175-
const plugin = laravel('resources/js/app.js')
176-
177-
const config = plugin.config({}, { command: 'build', mode: 'development' })
178-
179-
expect(config.resolve.alias['ziggy']).toBe('vendor/tightenco/ziggy/dist/index.es.js')
180-
})
181-
182-
it('provides an ziggy alias when installed and using an alias array', () => {
183-
vi.spyOn(fs, 'existsSync').mockReturnValueOnce(true)
184-
185-
const plugin = laravel('resources/js/app.js')
186-
187-
const config = plugin.config({
188-
resolve: {
189-
alias: [],
190-
}
191-
}, { command: 'build', mode: 'development' })
192-
193-
expect(config.resolve.alias).toContainEqual({ find: 'ziggy', replacement: 'vendor/tightenco/ziggy/dist/index.es.js' })
194-
})
195-
196172
it('configures the Vite server when inside a Sail container', () => {
197173
process.env.LARAVEL_SAIL = '1'
198174
const plugin = laravel('resources/js/app.js')

0 commit comments

Comments
 (0)