Skip to content

Commit 443d018

Browse files
committed
Configure swc-loader in cypress-config
1 parent ff57deb commit 443d018

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

ws-nextjs-app/cypress.config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,24 @@ export default defineConfig({
4444
webpackOptions: {
4545
resolve: {
4646
extensions: ['.ts', '.tsx', '.js', '.jsx'],
47-
alias: { ...webpackDirAlias },
47+
alias: webpackDirAlias,
48+
},
49+
module: {
50+
rules: [
51+
{
52+
test: /\.[jt]sx?$/,
53+
exclude: /node_modules/,
54+
loader: 'swc-loader',
55+
options: {
56+
jsc: {
57+
parser: {
58+
syntax: 'typescript',
59+
tsx: true,
60+
},
61+
},
62+
},
63+
},
64+
],
4865
},
4966
plugins: [
5067
MomentTimezoneInclude({ startYear: 2010, endYear: 2025 }),

0 commit comments

Comments
 (0)