File tree Expand file tree Collapse file tree 13 files changed +281
-0
lines changed
webpack/preserve-dynamic-require-plugin Expand file tree Collapse file tree 13 files changed +281
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## API Report File for "@rushstack/webpack-preserve-dynamic-require-plugin "
2
+
3
+ > Do not edit this file. It is a report generated by [ API Extractor] ( https://api-extractor.com/ ) .
4
+
5
+ ``` ts
6
+
7
+ import type * as webpack from ' webpack' ;
8
+
9
+ // @public (undocumented)
10
+ export class PreserveDynamicRequireWebpackPlugin {
11
+ // (undocumented)
12
+ apply(compiler : webpack .Compiler ): void ;
13
+ }
14
+
15
+ // (No @packageDocumentation comment for this package)
16
+
17
+ ```
Original file line number Diff line number Diff line change 1027
1027
"reviewCategory" : " libraries" ,
1028
1028
"shouldPublish" : true
1029
1029
},
1030
+ {
1031
+ "packageName" : " @rushstack/webpack-preserve-dynamic-require-plugin" ,
1032
+ "projectFolder" : " webpack/preserve-dynamic-require-plugin" ,
1033
+ "reviewCategory" : " libraries" ,
1034
+ "shouldPublish" : true
1035
+ },
1030
1036
{
1031
1037
"packageName" : " @rushstack/set-webpack-public-path-plugin" ,
1032
1038
"projectFolder" : " webpack/set-webpack-public-path-plugin" ,
Original file line number Diff line number Diff line change
1
+ // This is a workaround for https://github.com/eslint/eslint/issues/3458
2
+ require ( '@rushstack/eslint-config/patch/modern-module-resolution' ) ;
3
+
4
+ module . exports = {
5
+ extends : [
6
+ '@rushstack/eslint-config/profile/node-trusted-tool' ,
7
+ '@rushstack/eslint-config/mixins/friendly-locals'
8
+ ] ,
9
+ parserOptions : { tsconfigRootDir : __dirname }
10
+ } ;
Original file line number Diff line number Diff line change
1
+ # THIS IS A STANDARD TEMPLATE FOR .npmignore FILES IN THIS REPO.
2
+
3
+ # Ignore all files by default, to avoid accidentally publishing unintended files.
4
+ *
5
+
6
+ # Use negative patterns to bring back the specific things we want to publish.
7
+ ! /bin /**
8
+ ! /lib /**
9
+ ! /lib- * /**
10
+ ! /dist /**
11
+ ! ThirdPartyNotice.txt
12
+
13
+ # Ignore certain patterns that should not get published.
14
+ /dist /* .stats. *
15
+ /lib /** /test /
16
+ /lib- * /** /test /
17
+ * .test.js
18
+
19
+ # NOTE: These don't need to be specified, because NPM includes them automatically.
20
+ #
21
+ # package.json
22
+ # README (and its variants)
23
+ # CHANGELOG (and its variants)
24
+ # LICENSE / LICENCE
25
+
26
+ # --------------------------------------------
27
+ # DO NOT MODIFY THE TEMPLATE ABOVE THIS LINE
28
+ # --------------------------------------------
29
+
30
+ # (Add your project-specific overrides here)
Original file line number Diff line number Diff line change
1
+ # @rushstack/webpack-preserve-dynamic-require-plugin
2
+
3
+ ## Overview
4
+
5
+ This Webpack plugin instructs webpack to leave dynamic usage of ` require ` as-is in the bundled code. For example, if your code contains:
6
+ ``` js
7
+ function requireSomeUserThing (path ) {
8
+ return require (path);
9
+ }
10
+ ```
11
+ The emitted bundle will preserve the call to ` require(path) ` instead of trying to process it.
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json" ,
3
+
4
+ "mainEntryPointFilePath" : " <projectFolder>/lib/index.d.ts" ,
5
+
6
+ "apiReport" : {
7
+ "enabled" : true ,
8
+ "reportFolder" : " ../../../common/reviews/api"
9
+ },
10
+
11
+ "docModel" : {
12
+ "enabled" : true ,
13
+ "apiJsonFilePath" : " ../../../common/temp/api/<unscopedPackageName>.api.json"
14
+ },
15
+
16
+ "dtsRollup" : {
17
+ "enabled" : true
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " @rushstack/heft-node-rig/profiles/default/config/jest.config.json"
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ // The "rig.json" file directs tools to look for their config files in an external package.
3
+ // Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4
+ "$schema" : " https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json" ,
5
+
6
+ "rigPackageName" : " @rushstack/heft-node-rig"
7
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @rushstack/webpack-preserve-dynamic-require-plugin" ,
3
+ "version" : " 0.8.11" ,
4
+ "description" : " This plugin tells webpack to leave dynamic calls to \" require\" as-is instead of trying to bundle them." ,
5
+ "main" : " lib/index.js" ,
6
+ "typings" : " dist/webpack-preserve-dynamic-require-plugin.d.ts" ,
7
+ "license" : " MIT" ,
8
+ "repository" : {
9
+ "type" : " git" ,
10
+ "url" : " https://github.com/microsoft/rushstack.git" ,
11
+ "directory" : " webpack/preserve-dynamic-require-plugin"
12
+ },
13
+ "engines" : {
14
+ "node" : " >=10.17.1"
15
+ },
16
+ "scripts" : {
17
+ "build" : " heft build --clean" ,
18
+ "_phase:build" : " heft build --clean" ,
19
+ "_phase:test" : " heft test --no-build"
20
+ },
21
+ "dependencies" : {},
22
+ "devDependencies" : {
23
+ "@rushstack/eslint-config" : " workspace:*" ,
24
+ "@rushstack/heft" : " workspace:*" ,
25
+ "@rushstack/heft-node-rig" : " workspace:*" ,
26
+ "@types/heft-jest" : " 1.0.1" ,
27
+ "@types/node" : " 12.20.24" ,
28
+ "webpack" : " ~5.68.0"
29
+ },
30
+ "sideEffects" : false
31
+ }
Original file line number Diff line number Diff line change
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports [` PreserveDynamicRequireWebpackPlugin Preserves dynamic require usage 1` ] = `
4
+ Map {
5
+ " /release/main.js" => " /******/ (() => { // webpackBootstrap
6
+ var __webpack_exports__ = {};
7
+ require (process .env .SOME_PATH );
8
+ /** ****/ } )()
9
+ ;",
10
+ }
11
+ ` ;
You can’t perform that action at this time.
0 commit comments