| 
									
										
										
										
											2022-06-02 17:37:43 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Copyright (c) Microsoft Corporation. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
					
						
							|  |  |  |  * you may not use this file except in compliance with the License. | 
					
						
							|  |  |  |  * You may obtain a copy of the License at | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  |  * distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  |  * See the License for the specific language governing permissions and | 
					
						
							|  |  |  |  * limitations under the License. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-01 20:28:49 -07:00
										 |  |  | const { test, expect, devices, defineConfig: originalDefineConfig } = require('@playwright/experimental-ct-core'); | 
					
						
							| 
									
										
										
										
											2022-06-02 17:37:43 -07:00
										 |  |  | const path = require('path'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-27 14:36:41 -08:00
										 |  |  | const plugin = () => { | 
					
						
							| 
									
										
										
										
											2022-06-02 17:37:43 -07:00
										 |  |  |   // Only fetch upon request to avoid resolution in workers.
 | 
					
						
							| 
									
										
										
										
											2023-04-17 19:19:21 -04:00
										 |  |  |   const { createPlugin } = require('@playwright/experimental-ct-core/lib/vitePlugin'); | 
					
						
							| 
									
										
										
										
											2022-06-02 17:37:43 -07:00
										 |  |  |   return createPlugin( | 
					
						
							|  |  |  |     path.join(__dirname, 'registerSource.mjs'), | 
					
						
							| 
									
										
										
										
											2022-12-27 18:14:39 +01:00
										 |  |  |     () => import('@vitejs/plugin-vue2').then(plugin => plugin.default())); | 
					
						
							| 
									
										
										
										
											2023-01-27 14:36:41 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | const defineConfig = config => originalDefineConfig({ ...config, _plugins: [plugin] }); | 
					
						
							| 
									
										
										
										
											2022-06-02 17:37:43 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-12 13:12:02 -08:00
										 |  |  | module.exports = { test, expect, devices, defineConfig }; |