@cypress/webpack-dev-server 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CypressCTWebpackPlugin.js +3 -3
- package/dist/createWebpackDevServer.js +1 -1
- package/dist/devServer.d.ts +14 -5
- package/dist/devServer.js +4 -4
- package/dist/helpers/angularHandler.d.ts +16 -15
- package/dist/helpers/angularHandler.js +39 -26
- package/dist/helpers/createReactAppHandler.js +2 -2
- package/dist/helpers/nextHandler.js +4 -4
- package/dist/helpers/nuxtHandler.js +1 -1
- package/dist/helpers/sourceRelativeWebpackModules.js +4 -3
- package/dist/helpers/vueCliHandler.js +1 -1
- package/dist/loader.js +2 -2
- package/dist/makeDefaultWebpackConfig.js +2 -2
- package/dist/makeWebpackConfig.js +1 -1
- package/dist/measureWebpackPerformance.js +4 -4
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CypressCTWebpackPlugin = exports.normalizeError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const lodash_1 =
|
|
6
|
-
const fs_extra_1 =
|
|
7
|
-
const path_1 =
|
|
5
|
+
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
8
|
const normalizeError = (error) => {
|
|
9
9
|
return typeof error === 'string' ? error : error.message;
|
|
10
10
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createWebpackDevServer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debug_1 =
|
|
5
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
6
6
|
const makeWebpackConfig_1 = require("./makeWebpackConfig");
|
|
7
7
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:start');
|
|
8
8
|
async function createWebpackDevServer(config) {
|
package/dist/devServer.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
|
+
/// <reference types="cypress" />
|
|
2
3
|
/// <reference types="node" />
|
|
3
4
|
import type { Configuration } from 'webpack';
|
|
4
5
|
import { SourceRelativeWebpackResult } from './helpers/sourceRelativeWebpackModules';
|
|
6
|
+
export declare type Frameworks = Extract<Cypress.DevServerConfigOptions, {
|
|
7
|
+
bundler: 'webpack';
|
|
8
|
+
}>['framework'];
|
|
9
|
+
declare type FrameworkConfig = {
|
|
10
|
+
framework?: Exclude<Frameworks, 'angular'>;
|
|
11
|
+
} | {
|
|
12
|
+
framework: 'angular';
|
|
13
|
+
options?: {
|
|
14
|
+
projectConfig: Cypress.AngularDevServerProjectConfig;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
5
17
|
export declare type WebpackDevServerConfig = {
|
|
6
18
|
specs: Cypress.Spec[];
|
|
7
19
|
cypressConfig: Cypress.PluginConfigOptions;
|
|
8
20
|
devServerEvents: NodeJS.EventEmitter;
|
|
9
21
|
onConfigNotFound?: (devServer: 'webpack', cwd: string, lookedIn: string[]) => void;
|
|
10
|
-
} & {
|
|
11
|
-
framework?: typeof ALL_FRAMEWORKS[number];
|
|
12
22
|
webpackConfig?: unknown;
|
|
13
|
-
};
|
|
14
|
-
export declare const ALL_FRAMEWORKS: readonly ["create-react-app", "nuxt", "react", "vue-cli", "next", "vue", "angular"];
|
|
23
|
+
} & FrameworkConfig;
|
|
15
24
|
/**
|
|
16
25
|
* import { devServer } from '@cypress/webpack-dev-server'
|
|
17
26
|
*
|
|
@@ -25,7 +34,7 @@ export declare namespace devServer {
|
|
|
25
34
|
var create: (devServerConfig: WebpackDevServerConfig) => Promise<{
|
|
26
35
|
server: unknown;
|
|
27
36
|
compiler: object;
|
|
28
|
-
version:
|
|
37
|
+
version: 3 | 4;
|
|
29
38
|
}>;
|
|
30
39
|
}
|
|
31
40
|
export declare type PresetHandlerResult = {
|
package/dist/devServer.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/// <reference types="cypress" />
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.devServer =
|
|
4
|
+
exports.devServer = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const createWebpackDevServer_1 = require("./createWebpackDevServer");
|
|
7
|
-
const debug_1 =
|
|
7
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
8
8
|
const vueCliHandler_1 = require("./helpers/vueCliHandler");
|
|
9
9
|
const nuxtHandler_1 = require("./helpers/nuxtHandler");
|
|
10
10
|
const createReactAppHandler_1 = require("./helpers/createReactAppHandler");
|
|
@@ -12,7 +12,6 @@ const nextHandler_1 = require("./helpers/nextHandler");
|
|
|
12
12
|
const sourceRelativeWebpackModules_1 = require("./helpers/sourceRelativeWebpackModules");
|
|
13
13
|
const angularHandler_1 = require("./helpers/angularHandler");
|
|
14
14
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:devServer');
|
|
15
|
-
exports.ALL_FRAMEWORKS = ['create-react-app', 'nuxt', 'react', 'vue-cli', 'next', 'vue', 'angular'];
|
|
16
15
|
/**
|
|
17
16
|
* import { devServer } from '@cypress/webpack-dev-server'
|
|
18
17
|
*
|
|
@@ -77,10 +76,11 @@ async function getPreset(devServerConfig) {
|
|
|
77
76
|
return await (0, angularHandler_1.angularHandler)(devServerConfig);
|
|
78
77
|
case 'react':
|
|
79
78
|
case 'vue':
|
|
79
|
+
case 'svelte':
|
|
80
80
|
case undefined:
|
|
81
81
|
return { sourceWebpackModulesResult: (0, sourceRelativeWebpackModules_1.sourceDefaultWebpackDependencies)(devServerConfig) };
|
|
82
82
|
default:
|
|
83
|
-
throw new Error(`Unexpected framework ${devServerConfig.framework},
|
|
83
|
+
throw new Error(`Unexpected framework ${devServerConfig.framework}, please visit https://docs.cypress.io/guides/component-testing/component-framework-configuration to see a list of supported frameworks`);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
1
2
|
import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer';
|
|
3
|
+
export declare type BuildOptions = Record<string, any>;
|
|
4
|
+
export declare type AngularWebpackDevServerConfig = Extract<WebpackDevServerConfig, {
|
|
5
|
+
framework: 'angular';
|
|
6
|
+
}>;
|
|
7
|
+
declare type Configurations = {
|
|
8
|
+
configurations?: {
|
|
9
|
+
[configuration: string]: BuildOptions;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
2
12
|
export declare type AngularJsonProjectConfig = {
|
|
3
13
|
projectType: string;
|
|
4
14
|
root: string;
|
|
5
15
|
sourceRoot: string;
|
|
6
16
|
architect: {
|
|
7
17
|
build: {
|
|
8
|
-
options:
|
|
9
|
-
|
|
10
|
-
} & {
|
|
11
|
-
polyfills?: string;
|
|
12
|
-
};
|
|
13
|
-
configurations?: {
|
|
14
|
-
[configuration: string]: {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
18
|
+
options: BuildOptions;
|
|
19
|
+
} & Configurations;
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
declare type AngularJson = {
|
|
@@ -24,13 +25,12 @@ declare type AngularJson = {
|
|
|
24
25
|
[project: string]: AngularJsonProjectConfig;
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function getAngularBuildOptions(
|
|
28
|
+
export declare function getProjectConfig(projectRoot: string): Promise<Cypress.AngularDevServerProjectConfig>;
|
|
29
|
+
export declare function getAngularBuildOptions(buildOptions: BuildOptions, tsConfig: string): {
|
|
29
30
|
tsConfig: string;
|
|
30
31
|
aot: boolean;
|
|
31
32
|
outputHashing: string;
|
|
32
33
|
budgets: undefined;
|
|
33
|
-
polyfills?: string | undefined;
|
|
34
34
|
outputPath: string;
|
|
35
35
|
assets: never[];
|
|
36
36
|
styles: never[];
|
|
@@ -68,7 +68,7 @@ export declare function getAngularBuildOptions(projectConfig: AngularJsonProject
|
|
|
68
68
|
sourceMap: boolean;
|
|
69
69
|
namedChunks: boolean;
|
|
70
70
|
};
|
|
71
|
-
export declare function generateTsConfig(devServerConfig:
|
|
71
|
+
export declare function generateTsConfig(devServerConfig: AngularWebpackDevServerConfig, buildOptions: BuildOptions): Promise<string>;
|
|
72
72
|
export declare function getTempDir(): Promise<string>;
|
|
73
73
|
export declare function getAngularCliModules(projectRoot: string): Promise<{
|
|
74
74
|
generateBrowserWebpackConfigFromContext: any;
|
|
@@ -77,4 +77,5 @@ export declare function getAngularCliModules(projectRoot: string): Promise<{
|
|
|
77
77
|
}>;
|
|
78
78
|
export declare function getAngularJson(projectRoot: string): Promise<AngularJson>;
|
|
79
79
|
export declare const toPosix: (filePath: string) => string;
|
|
80
|
+
export declare function angularHandler(devServerConfig: AngularWebpackDevServerConfig): Promise<PresetHandlerResult>;
|
|
80
81
|
export {};
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toPosix = exports.getAngularJson = exports.getAngularCliModules = exports.getTempDir = exports.generateTsConfig = exports.getAngularBuildOptions = exports.
|
|
3
|
+
exports.angularHandler = exports.toPosix = exports.getAngularJson = exports.getAngularCliModules = exports.getTempDir = exports.generateTsConfig = exports.getAngularBuildOptions = exports.getProjectConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fs =
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
6
6
|
const os_1 = require("os");
|
|
7
|
-
const path =
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
8
|
const url_1 = require("url");
|
|
9
9
|
const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
|
|
10
10
|
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
|
11
|
-
async function
|
|
12
|
-
|
|
13
|
-
return { frameworkConfig: webpackConfig, sourceWebpackModulesResult: (0, sourceRelativeWebpackModules_1.sourceDefaultWebpackDependencies)(devServerConfig) };
|
|
14
|
-
}
|
|
15
|
-
exports.angularHandler = angularHandler;
|
|
16
|
-
async function getAngularCliWebpackConfig(devServerConfig) {
|
|
17
|
-
const { projectRoot } = devServerConfig.cypressConfig;
|
|
18
|
-
const { generateBrowserWebpackConfigFromContext, getCommonConfig, getStylesConfig, } = await getAngularCliModules(projectRoot);
|
|
11
|
+
async function getProjectConfig(projectRoot) {
|
|
12
|
+
var _a;
|
|
19
13
|
const angularJson = await getAngularJson(projectRoot);
|
|
20
14
|
let { defaultProject } = angularJson;
|
|
21
15
|
if (!defaultProject) {
|
|
22
16
|
defaultProject = Object.keys(angularJson.projects).find((name) => angularJson.projects[name].projectType === 'application');
|
|
23
17
|
if (!defaultProject) {
|
|
24
|
-
throw new Error('Could not find a project with projectType "application" in "angular.json"');
|
|
18
|
+
throw new Error('Could not find a project with projectType "application" in "angular.json". Visit https://docs.cypress.io/guides/references/configuration#Options-API to see how to pass in a custom project configuration');
|
|
25
19
|
}
|
|
26
20
|
}
|
|
27
21
|
const defaultProjectConfig = angularJson.projects[defaultProject];
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
const { architect, root, sourceRoot } = defaultProjectConfig;
|
|
23
|
+
const { build } = architect;
|
|
24
|
+
return {
|
|
25
|
+
root,
|
|
26
|
+
sourceRoot,
|
|
27
|
+
buildOptions: Object.assign(Object.assign({}, build.options), ((_a = build.configurations) === null || _a === void 0 ? void 0 : _a.development) || {}),
|
|
28
|
+
};
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
exports.getProjectConfig = getProjectConfig;
|
|
31
|
+
function getAngularBuildOptions(buildOptions, tsConfig) {
|
|
37
32
|
// Default options are derived from the @angular-devkit/build-angular browser builder, with some options from
|
|
38
33
|
// the serve builder thrown in for development.
|
|
39
34
|
// see: https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/builders/browser/schema.json
|
|
40
|
-
return Object.assign(Object.assign(
|
|
35
|
+
return Object.assign(Object.assign({ outputPath: 'dist/angular-app', assets: [], styles: [], scripts: [], fileReplacements: [], inlineStyleLanguage: 'css', stylePreprocessorOptions: { includePaths: [] }, resourcesOutputPath: undefined, commonChunk: true, baseHref: undefined, deployUrl: undefined, verbose: false, progress: false, i18nMissingTranslation: 'warning', i18nDuplicateTranslation: 'warning', localize: undefined, watch: true, poll: undefined, deleteOutputPath: true, preserveSymlinks: undefined, showCircularDependencies: false, subresourceIntegrity: false, serviceWorker: false, ngswConfigPath: undefined, statsJson: false, webWorkerTsConfig: undefined, crossOrigin: 'none', allowedCommonJsDependencies: [], buildOptimizer: false, optimization: false, vendorChunk: true, extractLicenses: false, sourceMap: true, namedChunks: true }, buildOptions), { tsConfig, aot: false, outputHashing: 'none', budgets: undefined });
|
|
41
36
|
}
|
|
42
37
|
exports.getAngularBuildOptions = getAngularBuildOptions;
|
|
43
|
-
async function generateTsConfig(devServerConfig,
|
|
38
|
+
async function generateTsConfig(devServerConfig, buildOptions) {
|
|
44
39
|
const { cypressConfig } = devServerConfig;
|
|
45
40
|
const { projectRoot } = cypressConfig;
|
|
46
41
|
const specPattern = Array.isArray(cypressConfig.specPattern) ? cypressConfig.specPattern : [cypressConfig.specPattern];
|
|
@@ -49,8 +44,8 @@ async function generateTsConfig(devServerConfig, projectConfig) {
|
|
|
49
44
|
if (cypressConfig.supportFile) {
|
|
50
45
|
includePaths.push((0, exports.toPosix)(cypressConfig.supportFile));
|
|
51
46
|
}
|
|
52
|
-
if (
|
|
53
|
-
const polyfills = getProjectFilePath(
|
|
47
|
+
if (buildOptions.polyfills) {
|
|
48
|
+
const polyfills = getProjectFilePath(buildOptions.polyfills);
|
|
54
49
|
includePaths.push(polyfills);
|
|
55
50
|
}
|
|
56
51
|
const cypressTypes = getProjectFilePath('node_modules', 'cypress', 'types', 'index.d.ts');
|
|
@@ -107,13 +102,13 @@ async function getAngularJson(projectRoot) {
|
|
|
107
102
|
return JSON.parse(angularJson);
|
|
108
103
|
}
|
|
109
104
|
exports.getAngularJson = getAngularJson;
|
|
110
|
-
function createFakeContext(projectRoot,
|
|
105
|
+
function createFakeContext(projectRoot, defaultProjectConfig) {
|
|
111
106
|
const logger = {
|
|
112
107
|
createChild: () => ({}),
|
|
113
108
|
};
|
|
114
109
|
const context = {
|
|
115
110
|
target: {
|
|
116
|
-
project:
|
|
111
|
+
project: 'angular',
|
|
117
112
|
},
|
|
118
113
|
workspaceRoot: projectRoot,
|
|
119
114
|
getProjectMetadata: () => {
|
|
@@ -129,3 +124,21 @@ function createFakeContext(projectRoot, defaultProject, defaultProjectConfig) {
|
|
|
129
124
|
}
|
|
130
125
|
const toPosix = (filePath) => filePath.split(path.sep).join(path.posix.sep);
|
|
131
126
|
exports.toPosix = toPosix;
|
|
127
|
+
async function getAngularCliWebpackConfig(devServerConfig) {
|
|
128
|
+
var _a;
|
|
129
|
+
const { projectRoot } = devServerConfig.cypressConfig;
|
|
130
|
+
const { generateBrowserWebpackConfigFromContext, getCommonConfig, getStylesConfig, } = await getAngularCliModules(projectRoot);
|
|
131
|
+
// normalize
|
|
132
|
+
const projectConfig = ((_a = devServerConfig.options) === null || _a === void 0 ? void 0 : _a.projectConfig) || await getProjectConfig(projectRoot);
|
|
133
|
+
const tsConfig = await generateTsConfig(devServerConfig, projectConfig.buildOptions);
|
|
134
|
+
const buildOptions = getAngularBuildOptions(projectConfig.buildOptions, tsConfig);
|
|
135
|
+
const context = createFakeContext(projectRoot, projectConfig);
|
|
136
|
+
const { config } = await generateBrowserWebpackConfigFromContext(buildOptions, context, (wco) => [getCommonConfig(wco), getStylesConfig(wco)]);
|
|
137
|
+
delete config.entry.main;
|
|
138
|
+
return config;
|
|
139
|
+
}
|
|
140
|
+
async function angularHandler(devServerConfig) {
|
|
141
|
+
const webpackConfig = await getAngularCliWebpackConfig(devServerConfig);
|
|
142
|
+
return { frameworkConfig: webpackConfig, sourceWebpackModulesResult: (0, sourceRelativeWebpackModules_1.sourceDefaultWebpackDependencies)(devServerConfig) };
|
|
143
|
+
}
|
|
144
|
+
exports.angularHandler = angularHandler;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reactScriptsFiveModifications = exports.cypressGlobals = exports.createReactAppHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debug_1 =
|
|
6
|
-
const path_1 =
|
|
5
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
|
|
8
8
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:create-react-app');
|
|
9
9
|
/**
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.allCssTests = exports.nextHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debug_1 =
|
|
6
|
-
const module_1 =
|
|
7
|
-
const fs =
|
|
8
|
-
const path =
|
|
5
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
6
|
+
const module_1 = tslib_1.__importDefault(require("module"));
|
|
7
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
8
|
+
const path = tslib_1.__importStar(require("path"));
|
|
9
9
|
const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
|
|
10
10
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server-fresh:nextHandler');
|
|
11
11
|
async function nextHandler(devServerConfig) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nuxtHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debug_1 =
|
|
5
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
6
6
|
const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
|
|
7
7
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:nuxtHandler');
|
|
8
8
|
async function nuxtHandler(devServerConfig) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.restoreLoadHook = exports.getMajorVersion = exports.sourceDefaultWebpackDependencies = exports.sourceHtmlWebpackPlugin = exports.sourceWebpackDevServer = exports.sourceWebpack = exports.sourceFramework = exports.cypressWebpackPath = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const module_1 =
|
|
6
|
-
const path_1 =
|
|
7
|
-
const debug_1 =
|
|
5
|
+
const module_1 = tslib_1.__importDefault(require("module"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
8
8
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:sourceRelativeWebpackModules');
|
|
9
9
|
const originalModuleLoad = module_1.default._load;
|
|
10
10
|
const originalModuleResolveFilename = module_1.default._resolveFilename;
|
|
@@ -24,6 +24,7 @@ const frameworkWebpackMapper = {
|
|
|
24
24
|
vue: undefined,
|
|
25
25
|
next: 'next',
|
|
26
26
|
'angular': '@angular-devkit/build-angular',
|
|
27
|
+
'svelte': undefined,
|
|
27
28
|
};
|
|
28
29
|
// Source the users framework from the provided projectRoot. The framework, if available, will serve
|
|
29
30
|
// as the resolve base for webpack dependency resolution.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.vueCliHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debug_1 =
|
|
5
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
6
6
|
const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
|
|
7
7
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:vueCliHandler');
|
|
8
8
|
function vueCliHandler(devServerConfig) {
|
package/dist/loader.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/// <reference types="cypress" />
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const debug_1 =
|
|
7
|
-
const path =
|
|
6
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
8
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:webpack');
|
|
9
9
|
/**
|
|
10
10
|
* @param {ComponentSpec} file spec to create import string from.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeDefaultWebpackConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 =
|
|
6
|
-
const debug_1 =
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
7
7
|
const debug = (0, debug_1.default)('cypress:webpack-dev-server:makeDefaultWebpackConfig');
|
|
8
8
|
const OUTPUT_PATH = path_1.default.join(__dirname, 'dist');
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeWebpackConfig = exports.CYPRESS_WEBPACK_ENTRYPOINT = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const debug_1 = require("debug");
|
|
6
|
-
const path =
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
7
7
|
const webpack_merge_1 = require("webpack-merge");
|
|
8
8
|
const local_pkg_1 = require("local-pkg");
|
|
9
9
|
const makeDefaultWebpackConfig_1 = require("./makeDefaultWebpackConfig");
|
|
@@ -4,10 +4,10 @@ exports.measureWebpackPerformance = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable no-restricted-syntax */
|
|
6
6
|
/* eslint-disable no-console */
|
|
7
|
-
const path_1 =
|
|
8
|
-
const fs_1 =
|
|
9
|
-
const chalk_1 =
|
|
10
|
-
const speed_measure_webpack_plugin_1 =
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
9
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
10
|
+
const speed_measure_webpack_plugin_1 = tslib_1.__importDefault(require("speed-measure-webpack-plugin"));
|
|
11
11
|
/**
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|