@rushstack/heft-webpack5-plugin 0.6.0-rc.2 → 0.6.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/README.md +1 -2
- package/dist/heft-webpack5-plugin.d.ts +20 -85
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/WebpackConfigurationLoader.d.ts +4 -16
- package/lib/WebpackConfigurationLoader.d.ts.map +1 -1
- package/lib/WebpackConfigurationLoader.js +47 -37
- package/lib/WebpackConfigurationLoader.js.map +1 -1
- package/lib/WebpackPlugin.d.ts +14 -0
- package/lib/WebpackPlugin.d.ts.map +1 -0
- package/lib/WebpackPlugin.js +266 -0
- package/lib/WebpackPlugin.js.map +1 -0
- package/lib/index.d.ts +7 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/lib/shared.d.ts +14 -77
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js.map +1 -1
- package/package.json +12 -15
- package/heft-plugin.json +0 -20
- package/lib/Webpack5Plugin.d.ts +0 -34
- package/lib/Webpack5Plugin.d.ts.map +0 -1
- package/lib/Webpack5Plugin.js +0 -366
- package/lib/Webpack5Plugin.js.map +0 -1
- package/lib/schemas/heft-webpack5-plugin.schema.json +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebpackPlugin.js","sourceRoot":"","sources":["../src/WebpackPlugin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+CAAiC;AAUjC,oEAA6G;AAe7G,6EAA0E;AAE1E,MAAM,OAAO,GAA6B,0BAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAE1E,MAAM,WAAW,GAAW,eAAe,CAAC;AAC5C,MAAM,+BAA+B,GAAW,oBAAoB,CAAC;AACrE,MAAM,+BAA+B,GAAW,oBAAoB,CAAC;AAOrE;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,CAAC,CAAC;aACzB;SACF;IACH,CAAC;IAEO,eAAe,CAAC,WAAmB,EAAE,KAAwB;QACnE,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,OAAO,KAAK,CAAC;SACd;aAAM;YACL,IAAI,UAAU,GAAuB,KAAK,CAAC,UAAU,CAAC;YACtD,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC,gBAAgB,EAAE;gBACzC,UAAU,GAAG,wBAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;aAC5F;YAED,IAAI,cAAsB,CAAC;YAC3B,IAAI,KAAK,CAAC,GAAG,IAAI,UAAU,EAAE;gBAC3B,cAAc,GAAG,GAAG,UAAU,IAAI,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;aAClE;iBAAM,IAAI,UAAU,EAAE;gBACrB,cAAc,GAAG,GAAG,UAAU,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;aACrD;iBAAM;gBACL,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC;aAChC;YAED,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AAnSD,sCAmSC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as nodePath from 'path';\nimport type {\n Compiler as WebpackCompiler,\n MultiCompiler as WebpackMultiCompiler,\n Stats as WebpackStats,\n MultiStats as WebpackMultiStats,\n StatsCompilation as WebpackStatsCompilation,\n StatsError as WebpackStatsError\n} from 'webpack';\nimport type TWebpackDevServer from 'webpack-dev-server';\nimport { LegacyAdapters, Path, Import, IPackageJson, PackageJsonLookup } from '@rushstack/node-core-library';\nimport type {\n HeftConfiguration,\n HeftSession,\n IBuildStageContext,\n IBuildStageProperties,\n IBundleSubstage,\n IHeftPlugin,\n ScopedLogger\n} from '@rushstack/heft';\nimport type {\n IWebpackConfiguration,\n IWebpackBundleSubstageProperties,\n IWebpackBuildStageProperties\n} from './shared';\nimport { WebpackConfigurationLoader } from './WebpackConfigurationLoader';\n\nconst webpack: typeof import('webpack') = Import.lazy('webpack', require);\n\nconst PLUGIN_NAME: string = 'WebpackPlugin';\nconst WEBPACK_DEV_SERVER_PACKAGE_NAME: string = 'webpack-dev-server';\nconst WEBPACK_DEV_SERVER_ENV_VAR_NAME: string = 'WEBPACK_DEV_SERVER';\n\ninterface IWebpackVersions {\n webpackVersion: string;\n webpackDevServerVersion: string;\n}\n\n/**\n * @internal\n */\nexport class WebpackPlugin implements IHeftPlugin {\n public readonly pluginName: string = PLUGIN_NAME;\n\n private static _webpackVersions: IWebpackVersions | undefined;\n private static _getWebpackVersions(): IWebpackVersions {\n if (!WebpackPlugin._webpackVersions) {\n const webpackDevServerPackageJsonPath: string = Import.resolveModule({\n modulePath: 'webpack-dev-server/package.json',\n baseFolderPath: __dirname\n });\n const webpackDevServerPackageJson: IPackageJson = PackageJsonLookup.instance.loadPackageJson(\n webpackDevServerPackageJsonPath\n );\n WebpackPlugin._webpackVersions = {\n webpackVersion: webpack.version!,\n webpackDevServerVersion: webpackDevServerPackageJson.version\n };\n }\n\n return WebpackPlugin._webpackVersions;\n }\n\n public apply(heftSession: HeftSession, heftConfiguration: HeftConfiguration): void {\n heftSession.hooks.build.tap(PLUGIN_NAME, (build: IBuildStageContext) => {\n build.hooks.bundle.tap(PLUGIN_NAME, (bundle: IBundleSubstage) => {\n bundle.hooks.configureWebpack.tap(\n { name: PLUGIN_NAME, stage: Number.MIN_SAFE_INTEGER },\n (webpackConfiguration: unknown) => {\n const webpackVersions: IWebpackVersions = WebpackPlugin._getWebpackVersions();\n bundle.properties.webpackVersion = webpack.version;\n bundle.properties.webpackDevServerVersion = webpackVersions.webpackDevServerVersion;\n\n return webpackConfiguration;\n }\n );\n\n bundle.hooks.configureWebpack.tapPromise(PLUGIN_NAME, async (existingConfiguration: unknown) => {\n const logger: ScopedLogger = heftSession.requestScopedLogger('configure-webpack');\n if (existingConfiguration) {\n logger.terminal.writeVerboseLine(\n 'Skipping loading webpack config file because the webpack config has already been set.'\n );\n return existingConfiguration;\n } else {\n return await WebpackConfigurationLoader.tryLoadWebpackConfigAsync(\n logger,\n heftConfiguration.buildFolder,\n build.properties\n );\n }\n });\n\n bundle.hooks.run.tapPromise(PLUGIN_NAME, async () => {\n await this._runWebpackAsync(\n heftSession,\n heftConfiguration,\n bundle.properties as IWebpackBundleSubstageProperties,\n build.properties,\n heftConfiguration.terminalProvider.supportsColor\n );\n });\n });\n });\n }\n\n private async _runWebpackAsync(\n heftSession: HeftSession,\n heftConfiguration: HeftConfiguration,\n bundleSubstageProperties: IWebpackBundleSubstageProperties,\n buildProperties: IBuildStageProperties,\n supportsColor: boolean\n ): Promise<void> {\n const webpackConfiguration: IWebpackConfiguration | undefined | null =\n bundleSubstageProperties.webpackConfiguration;\n if (!webpackConfiguration) {\n return;\n }\n\n const logger: ScopedLogger = heftSession.requestScopedLogger('webpack');\n const webpackVersions: IWebpackVersions = WebpackPlugin._getWebpackVersions();\n if (bundleSubstageProperties.webpackVersion !== webpackVersions.webpackVersion) {\n logger.emitError(\n new Error(\n `The Webpack plugin expected to be configured with Webpack version ${webpackVersions.webpackVersion}, ` +\n `but the configuration specifies version ${bundleSubstageProperties.webpackVersion}. ` +\n 'Are multiple versions of the Webpack plugin present?'\n )\n );\n }\n\n if (bundleSubstageProperties.webpackDevServerVersion !== webpackVersions.webpackDevServerVersion) {\n logger.emitError(\n new Error(\n `The Webpack plugin expected to be configured with webpack-dev-server version ${webpackVersions.webpackDevServerVersion}, ` +\n `but the configuration specifies version ${bundleSubstageProperties.webpackDevServerVersion}. ` +\n 'Are multiple versions of the Webpack plugin present?'\n )\n );\n }\n\n logger.terminal.writeLine(`Using Webpack version ${webpack.version}`);\n\n let compiler: WebpackCompiler | WebpackMultiCompiler;\n if (Array.isArray(webpackConfiguration)) {\n if (webpackConfiguration.length === 0) {\n logger.terminal.writeLine('The webpack configuration is an empty array - nothing to do.');\n return;\n } else {\n compiler = webpack(webpackConfiguration); /* (webpack.Compilation[]) => MultiCompiler */\n }\n } else {\n compiler = webpack(webpackConfiguration); /* (webpack.Compilation) => Compiler */\n }\n\n if (buildProperties.serveMode) {\n const defaultDevServerOptions: TWebpackDevServer.Configuration = {\n host: 'localhost',\n devMiddleware: {\n publicPath: '/',\n stats: {\n cached: false,\n cachedAssets: false,\n colors: supportsColor\n }\n },\n client: {\n logging: 'info',\n webSocketURL: {\n port: 8080\n }\n },\n port: 8080\n };\n\n let options: TWebpackDevServer.Configuration;\n if (Array.isArray(webpackConfiguration)) {\n const devServerOptions: TWebpackDevServer.Configuration[] = webpackConfiguration\n .map((configuration) => configuration.devServer)\n .filter((devServer): devServer is TWebpackDevServer.Configuration => !!devServer);\n if (devServerOptions.length > 1) {\n logger.emitWarning(\n new Error(`Detected multiple webpack devServer configurations, using the first one.`)\n );\n }\n\n if (devServerOptions.length > 0) {\n options = { ...defaultDevServerOptions, ...devServerOptions[0] };\n } else {\n options = defaultDevServerOptions;\n }\n } else {\n options = { ...defaultDevServerOptions, ...webpackConfiguration.devServer };\n }\n\n // Register a plugin to callback after webpack is done with the first compilation\n // so we can move on to post-build\n let firstCompilationDoneCallback: (() => void) | undefined;\n const originalBeforeCallback: typeof options.setupMiddlewares | undefined = options.setupMiddlewares;\n options.setupMiddlewares = (middlewares, devServer) => {\n compiler.hooks.done.tap('heft-webpack-plugin', () => {\n if (firstCompilationDoneCallback) {\n firstCompilationDoneCallback();\n firstCompilationDoneCallback = undefined;\n }\n });\n\n if (originalBeforeCallback) {\n return originalBeforeCallback(middlewares, devServer);\n }\n return middlewares;\n };\n\n // The webpack-dev-server package has a design flaw, where merely loading its package will set the\n // WEBPACK_DEV_SERVER environment variable -- even if no APIs are accessed. This environment variable\n // causes incorrect behavior if Heft is not running in serve mode. Thus, we need to be careful to call require()\n // only if Heft is in serve mode.\n const WebpackDevServer: typeof TWebpackDevServer = require(WEBPACK_DEV_SERVER_PACKAGE_NAME);\n // TODO: the WebpackDevServer accepts a third parameter for a logger. We should make\n // use of that to make logging cleaner\n const webpackDevServer: TWebpackDevServer = new WebpackDevServer(options, compiler);\n\n await new Promise<void>((resolve: () => void, reject: (error: Error) => void) => {\n firstCompilationDoneCallback = resolve;\n\n // Wrap in promise.resolve due to small issue in the type declaration, return type should be\n // webpackDevServer.start(): Promise<void>;\n Promise.resolve(webpackDevServer.start()).catch(reject);\n });\n } else {\n if (process.env[WEBPACK_DEV_SERVER_ENV_VAR_NAME]) {\n logger.emitWarning(\n new Error(\n `The \"${WEBPACK_DEV_SERVER_ENV_VAR_NAME}\" environment variable is set, ` +\n 'which will cause problems when webpack is not running in serve mode. ' +\n `(Did a dependency inadvertently load the \"${WEBPACK_DEV_SERVER_PACKAGE_NAME}\" package?)`\n )\n );\n }\n\n let stats: WebpackStats | WebpackMultiStats | undefined;\n if (buildProperties.watchMode) {\n try {\n stats = await LegacyAdapters.convertCallbackToPromise(\n (compiler as WebpackCompiler).watch.bind(compiler),\n {}\n );\n } catch (e) {\n logger.emitError(e as Error);\n }\n } else {\n try {\n stats = await LegacyAdapters.convertCallbackToPromise(\n (compiler as WebpackCompiler).run.bind(compiler)\n );\n await LegacyAdapters.convertCallbackToPromise(compiler.close.bind(compiler));\n } catch (e) {\n logger.emitError(e as Error);\n }\n }\n\n if (stats) {\n // eslint-disable-next-line require-atomic-updates\n (buildProperties as IWebpackBuildStageProperties).webpackStats = stats;\n\n this._emitErrors(logger, heftConfiguration.buildFolder, stats);\n }\n }\n }\n\n private _emitErrors(\n logger: ScopedLogger,\n buildFolder: string,\n stats: WebpackStats | WebpackMultiStats\n ): void {\n if (stats.hasErrors() || stats.hasWarnings()) {\n const serializedStats: WebpackStatsCompilation[] = [stats.toJson('errors-warnings')];\n\n const errors: Error[] = [];\n const warnings: Error[] = [];\n\n for (const compilationStats of serializedStats) {\n if (compilationStats.warnings) {\n for (const warning of compilationStats.warnings) {\n warnings.push(this._normalizeError(buildFolder, warning));\n }\n }\n\n if (compilationStats.errors) {\n for (const error of compilationStats.errors) {\n errors.push(this._normalizeError(buildFolder, error));\n }\n }\n\n if (compilationStats.children) {\n for (const child of compilationStats.children) {\n serializedStats.push(child);\n }\n }\n }\n\n for (const warning of warnings) {\n logger.emitWarning(warning);\n }\n\n for (const error of errors) {\n logger.emitError(error);\n }\n }\n }\n\n private _normalizeError(buildFolder: string, error: WebpackStatsError): Error {\n if (error instanceof Error) {\n return error;\n } else {\n let moduleName: string | undefined = error.moduleName;\n if (!moduleName && error.moduleIdentifier) {\n moduleName = Path.convertToSlashes(nodePath.relative(buildFolder, error.moduleIdentifier));\n }\n\n let formattedError: string;\n if (error.loc && moduleName) {\n formattedError = `${moduleName}:${error.loc} - ${error.message}`;\n } else if (moduleName) {\n formattedError = `${moduleName} - ${error.message}`;\n } else {\n formattedError = error.message;\n }\n\n return new Error(formattedError);\n }\n }\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import type { IHeftPlugin } from '@rushstack/heft';
|
|
2
|
+
export { IWebpackConfigurationWithDevServer, IWebpackConfiguration, IWebpackBuildStageProperties, IWebpackBundleSubstageProperties } from './shared';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: IHeftPlugin<void>;
|
|
7
|
+
export default _default;
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,OAAO,EACL,kCAAkC,EAClC,qBAAqB,EACrB,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,UAAU,CAAC;AAElB;;GAEG;;AACH,wBAAkD"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
3
|
// See LICENSE in the project root for license information.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const WebpackPlugin_1 = require("./WebpackPlugin");
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
exports.default = new WebpackPlugin_1.WebpackPlugin();
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAI3D,mDAAgD;AAShD;;GAEG;AACH,kBAAe,IAAI,6BAAa,EAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { IHeftPlugin } from '@rushstack/heft';\n\nimport { WebpackPlugin } from './WebpackPlugin';\n\nexport {\n IWebpackConfigurationWithDevServer,\n IWebpackConfiguration,\n IWebpackBuildStageProperties,\n IWebpackBundleSubstageProperties\n} from './shared';\n\n/**\n * @public\n */\nexport default new WebpackPlugin() as IHeftPlugin;\n"]}
|
package/lib/shared.d.ts
CHANGED
|
@@ -1,99 +1,36 @@
|
|
|
1
|
-
import type * as TWebpack from 'webpack';
|
|
2
1
|
import type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
|
|
3
|
-
import type
|
|
4
|
-
import type {
|
|
2
|
+
import type * as webpack from 'webpack';
|
|
3
|
+
import type { IBuildStageProperties, IBundleSubstageProperties } from '@rushstack/heft';
|
|
5
4
|
/**
|
|
6
|
-
* The environment passed into the Webpack configuration function. Loosely based
|
|
7
|
-
* on the default Webpack environment options, specified here:
|
|
8
|
-
* https://webpack.js.org/api/cli/#environment-options
|
|
9
|
-
*
|
|
10
5
|
* @public
|
|
11
6
|
*/
|
|
12
|
-
export interface
|
|
13
|
-
/**
|
|
14
|
-
* Whether or not the run is in production mode. Synonym of
|
|
15
|
-
* IWebpackConfigurationFnEnvironment.production.
|
|
16
|
-
*/
|
|
17
|
-
prod: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Whether or not the run is in production mode. Synonym of
|
|
20
|
-
* IWebpackConfigurationFnEnvironment.prod.
|
|
21
|
-
*/
|
|
22
|
-
production: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The task session provided to the plugin.
|
|
25
|
-
*/
|
|
26
|
-
taskSession: IHeftTaskSession;
|
|
27
|
-
/**
|
|
28
|
-
* The Heft configuration provided to the plugin.
|
|
29
|
-
*/
|
|
30
|
-
heftConfiguration: HeftConfiguration;
|
|
31
|
-
/**
|
|
32
|
-
* The resolved Webpack package.
|
|
33
|
-
*/
|
|
34
|
-
webpack: typeof TWebpack;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export interface IWebpackConfigurationWithDevServer extends TWebpack.Configuration {
|
|
7
|
+
export interface IWebpackConfigurationWithDevServer extends webpack.Configuration {
|
|
40
8
|
devServer?: WebpackDevServerConfiguration;
|
|
41
9
|
}
|
|
42
10
|
/**
|
|
43
11
|
* @public
|
|
44
12
|
*/
|
|
45
|
-
export declare type IWebpackConfiguration = IWebpackConfigurationWithDevServer | IWebpackConfigurationWithDevServer[];
|
|
13
|
+
export declare type IWebpackConfiguration = IWebpackConfigurationWithDevServer | IWebpackConfigurationWithDevServer[] | undefined;
|
|
46
14
|
/**
|
|
47
15
|
* @public
|
|
48
16
|
*/
|
|
49
|
-
export interface
|
|
17
|
+
export interface IWebpackBundleSubstageProperties extends IBundleSubstageProperties {
|
|
50
18
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* with the exports of the
|
|
54
|
-
*
|
|
19
|
+
* The configuration used by the Webpack plugin. This must be populated
|
|
20
|
+
* for Webpack to run. If webpackConfigFilePath is specified,
|
|
21
|
+
* this will be populated automatically with the exports of the
|
|
22
|
+
* config file referenced in that property.
|
|
55
23
|
*
|
|
56
24
|
* @remarks
|
|
57
|
-
* Tapable event handlers can return `
|
|
58
|
-
* other handlers from creating a configuration object
|
|
59
|
-
*/
|
|
60
|
-
readonly onLoadConfiguration: AsyncSeriesBailHook<never, never, never, IWebpackConfiguration | false>;
|
|
61
|
-
/**
|
|
62
|
-
* A hook that allows for modification of the loaded configuration used by the Webpack
|
|
63
|
-
* plugin. If no configuration was loaded, this hook will not be called.
|
|
64
|
-
*/
|
|
65
|
-
readonly onConfigure: AsyncSeriesHook<IWebpackConfiguration, never, never>;
|
|
66
|
-
/**
|
|
67
|
-
* A hook that provides the finalized configuration that will be used by Webpack.
|
|
68
|
-
* If no configuration was loaded, this hook will not be called.
|
|
69
|
-
*/
|
|
70
|
-
readonly onAfterConfigure: AsyncParallelHook<IWebpackConfiguration, never, never>;
|
|
71
|
-
/**
|
|
72
|
-
* A hook that provides the stats output from Webpack. If no configuration is loaded,
|
|
73
|
-
* this hook will not be called.
|
|
25
|
+
* Tapable event handlers can return `null` instead of `undefined` to suppress
|
|
26
|
+
* other handlers from creating a configuration object.
|
|
74
27
|
*/
|
|
75
|
-
|
|
28
|
+
webpackConfiguration?: webpack.Configuration | webpack.Configuration[] | null;
|
|
76
29
|
}
|
|
77
30
|
/**
|
|
78
31
|
* @public
|
|
79
32
|
*/
|
|
80
|
-
export interface
|
|
81
|
-
|
|
82
|
-
* Whether or not serve mode was enabled by passing the `--serve` flag.
|
|
83
|
-
*/
|
|
84
|
-
readonly isServeMode: boolean;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @public
|
|
88
|
-
*/
|
|
89
|
-
export interface IWebpackPluginAccessor {
|
|
90
|
-
/**
|
|
91
|
-
* Hooks that are called at various points in the Webpack plugin lifecycle.
|
|
92
|
-
*/
|
|
93
|
-
readonly hooks: IWebpackPluginAccessorHooks;
|
|
94
|
-
/**
|
|
95
|
-
* Parameters that are provided by the Webpack plugin.
|
|
96
|
-
*/
|
|
97
|
-
readonly parameters: IWebpackPluginAccessorParameters;
|
|
33
|
+
export interface IWebpackBuildStageProperties extends IBuildStageProperties {
|
|
34
|
+
webpackStats?: webpack.Stats | webpack.MultiStats;
|
|
98
35
|
}
|
|
99
36
|
//# sourceMappingURL=shared.d.ts.map
|
package/lib/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,OAAO,CAAC,aAAa;IAC/E,SAAS,CAAC,EAAE,6BAA6B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,qBAAqB,GAC7B,kCAAkC,GAClC,kCAAkC,EAAE,GACpC,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,gCAAiC,SAAQ,yBAAyB;IACjF;;;;;;;;;OASG;IAGH,oBAAoB,CAAC,EAAE,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC;CAC/E;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC;CACnD"}
|
package/lib/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\nimport type * as webpack from 'webpack';\nimport type { IBuildStageProperties, IBundleSubstageProperties } from '@rushstack/heft';\n\n/**\n * @public\n */\nexport interface IWebpackConfigurationWithDevServer extends webpack.Configuration {\n devServer?: WebpackDevServerConfiguration;\n}\n\n/**\n * @public\n */\nexport type IWebpackConfiguration =\n | IWebpackConfigurationWithDevServer\n | IWebpackConfigurationWithDevServer[]\n | undefined;\n\n/**\n * @public\n */\nexport interface IWebpackBundleSubstageProperties extends IBundleSubstageProperties {\n /**\n * The configuration used by the Webpack plugin. This must be populated\n * for Webpack to run. If webpackConfigFilePath is specified,\n * this will be populated automatically with the exports of the\n * config file referenced in that property.\n *\n * @remarks\n * Tapable event handlers can return `null` instead of `undefined` to suppress\n * other handlers from creating a configuration object.\n */\n // We are inheriting this problem from Tapable's API\n // eslint-disable-next-line @rushstack/no-new-null\n webpackConfiguration?: webpack.Configuration | webpack.Configuration[] | null;\n}\n\n/**\n * @public\n */\nexport interface IWebpackBuildStageProperties extends IBuildStageProperties {\n webpackStats?: webpack.Stats | webpack.MultiStats;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/heft-webpack5-plugin",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Heft plugin for Webpack 5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,27 +12,24 @@
|
|
|
12
12
|
"types": "dist/heft-webpack5-plugin.d.ts",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@rushstack/heft": "^0.49.
|
|
16
|
-
"webpack": "~5.
|
|
15
|
+
"@rushstack/heft": "^0.49.7",
|
|
16
|
+
"webpack": "~5.75.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@rushstack/node-core-library": "3.
|
|
21
|
-
"@types/tapable": "1.0.6",
|
|
22
|
-
"tapable": "1.1.3",
|
|
23
|
-
"webpack-dev-server": "~4.9.3"
|
|
19
|
+
"webpack-dev-server": "~4.9.3",
|
|
20
|
+
"@rushstack/node-core-library": "3.55.2"
|
|
24
21
|
},
|
|
25
22
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
28
|
-
"@rushstack/
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
23
|
+
"@types/node": "14.18.36",
|
|
24
|
+
"webpack": "~5.75.0",
|
|
25
|
+
"@rushstack/eslint-config": "3.2.0",
|
|
26
|
+
"@rushstack/heft": "0.49.7",
|
|
27
|
+
"@rushstack/heft-node-rig": "1.12.4"
|
|
31
28
|
},
|
|
32
29
|
"scripts": {
|
|
33
30
|
"build": "heft build --clean",
|
|
34
31
|
"start": "heft test --clean --watch",
|
|
35
|
-
"_phase:build": "heft
|
|
36
|
-
"_phase:test": "heft
|
|
32
|
+
"_phase:build": "heft build --clean",
|
|
33
|
+
"_phase:test": "heft test --no-build"
|
|
37
34
|
}
|
|
38
35
|
}
|
package/heft-plugin.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://developer.microsoft.com/json-schemas/heft/heft-plugin.schema.json",
|
|
3
|
-
|
|
4
|
-
"taskPlugins": [
|
|
5
|
-
{
|
|
6
|
-
"pluginName": "webpack5-plugin",
|
|
7
|
-
"entryPoint": "./lib/Webpack5Plugin",
|
|
8
|
-
"optionsSchema": "./lib/schemas/heft-webpack5-plugin.schema.json",
|
|
9
|
-
|
|
10
|
-
"parameterScope": "webpack5",
|
|
11
|
-
"parameters": [
|
|
12
|
-
{
|
|
13
|
-
"longName": "--serve",
|
|
14
|
-
"parameterKind": "flag",
|
|
15
|
-
"description": "Start a local web server for testing purposes using webpack-dev-server. This parameter is only available when running in watch mode."
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
package/lib/Webpack5Plugin.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { HeftConfiguration, IHeftTaskSession, IHeftTaskPlugin } from '@rushstack/heft';
|
|
2
|
-
import type { IWebpackPluginAccessor } from './shared';
|
|
3
|
-
export interface IWebpackPluginOptions {
|
|
4
|
-
devConfigurationPath: string | undefined;
|
|
5
|
-
configurationPath: string | undefined;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export declare const PLUGIN_NAME: 'webpack5-plugin';
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export default class Webpack5Plugin implements IHeftTaskPlugin<IWebpackPluginOptions> {
|
|
15
|
-
private _accessor;
|
|
16
|
-
private _isServeMode;
|
|
17
|
-
private _webpack;
|
|
18
|
-
private _webpackCompiler;
|
|
19
|
-
private _webpackConfiguration;
|
|
20
|
-
private _webpackWatchers;
|
|
21
|
-
private _webpackCompilationDonePromise;
|
|
22
|
-
private _webpackCompilationDonePromiseResolveFn;
|
|
23
|
-
get accessor(): IWebpackPluginAccessor;
|
|
24
|
-
apply(taskSession: IHeftTaskSession, heftConfiguration: HeftConfiguration, options: IWebpackPluginOptions): void;
|
|
25
|
-
private _getWebpackConfigurationAsync;
|
|
26
|
-
private _loadWebpackAsync;
|
|
27
|
-
private _getWebpackCompilerAsync;
|
|
28
|
-
private _runWebpackAsync;
|
|
29
|
-
private _runWebpackWatchAsync;
|
|
30
|
-
private _validateEnvironmentVariable;
|
|
31
|
-
private _emitErrors;
|
|
32
|
-
private _normalizeError;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=Webpack5Plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Webpack5Plugin.d.ts","sourceRoot":"","sources":["../src/Webpack5Plugin.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAIhB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAyB,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAM9E,MAAM,WAAW,qBAAqB;IACpC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,iBAAqC,CAAC;AAQhE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,eAAe,CAAC,qBAAqB,CAAC;IACnF,OAAO,CAAC,SAAS,CAAqC;IACtD,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,gBAAgB,CAAuD;IAC/E,OAAO,CAAC,qBAAqB,CAA2E;IACxG,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,8BAA8B,CAA4B;IAClE,OAAO,CAAC,uCAAuC,CAA2B;IAE1E,IAAW,QAAQ,IAAI,sBAAsB,CAe5C;IAEM,KAAK,CACV,WAAW,EAAE,gBAAgB,EAC7B,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,qBAAqB,GAC7B,IAAI;YAsBO,6BAA6B;YAoD7B,iBAAiB;YAQjB,wBAAwB;YAcxB,gBAAgB;YA8ChB,qBAAqB;IAiLnC,OAAO,CAAC,4BAA4B;IAYpC,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,eAAe;CAmCxB"}
|