@nx/vite 16.0.0-beta.1
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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/executors.d.ts +8 -0
- package/executors.js +19 -0
- package/executors.js.map +1 -0
- package/executors.json +46 -0
- package/generators.json +46 -0
- package/index.d.ts +8 -0
- package/index.js +20 -0
- package/index.js.map +1 -0
- package/migrations.json +80 -0
- package/package.json +60 -0
- package/plugins/rollup-replace-files.plugin.d.ts +16 -0
- package/plugins/rollup-replace-files.plugin.js +49 -0
- package/plugins/rollup-replace-files.plugin.js.map +1 -0
- package/src/executors/build/build.impl.d.ts +10 -0
- package/src/executors/build/build.impl.js +91 -0
- package/src/executors/build/build.impl.js.map +1 -0
- package/src/executors/build/compat.d.ts +2 -0
- package/src/executors/build/compat.js +10 -0
- package/src/executors/build/compat.js.map +1 -0
- package/src/executors/build/schema.d.js +3 -0
- package/src/executors/build/schema.d.js.map +1 -0
- package/src/executors/build/schema.d.ts +17 -0
- package/src/executors/build/schema.json +143 -0
- package/src/executors/dev-server/compat.d.ts +2 -0
- package/src/executors/dev-server/compat.js +10 -0
- package/src/executors/dev-server/compat.js.map +1 -0
- package/src/executors/dev-server/dev-server.impl.d.ts +8 -0
- package/src/executors/dev-server/dev-server.impl.js +68 -0
- package/src/executors/dev-server/dev-server.impl.js.map +1 -0
- package/src/executors/dev-server/schema.d.js +3 -0
- package/src/executors/dev-server/schema.d.js.map +1 -0
- package/src/executors/dev-server/schema.d.ts +14 -0
- package/src/executors/dev-server/schema.json +89 -0
- package/src/executors/preview-server/compat.d.ts +2 -0
- package/src/executors/preview-server/compat.js +10 -0
- package/src/executors/preview-server/compat.js.map +1 -0
- package/src/executors/preview-server/preview-server.impl.d.ts +7 -0
- package/src/executors/preview-server/preview-server.impl.js +107 -0
- package/src/executors/preview-server/preview-server.impl.js.map +1 -0
- package/src/executors/preview-server/schema.d.js +3 -0
- package/src/executors/preview-server/schema.d.js.map +1 -0
- package/src/executors/preview-server/schema.d.ts +12 -0
- package/src/executors/preview-server/schema.json +80 -0
- package/src/executors/test/compat.d.ts +2 -0
- package/src/executors/test/compat.js +10 -0
- package/src/executors/test/compat.js.map +1 -0
- package/src/executors/test/schema.d.js +3 -0
- package/src/executors/test/schema.d.js.map +1 -0
- package/src/executors/test/schema.d.ts +11 -0
- package/src/executors/test/schema.json +63 -0
- package/src/executors/test/vitest.impl.d.ts +6 -0
- package/src/executors/test/vitest.impl.js +130 -0
- package/src/executors/test/vitest.impl.js.map +1 -0
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/configuration/configuration.js +130 -0
- package/src/generators/configuration/configuration.js.map +1 -0
- package/src/generators/configuration/schema.d.js +3 -0
- package/src/generators/configuration/schema.d.js.map +1 -0
- package/src/generators/configuration/schema.d.ts +12 -0
- package/src/generators/configuration/schema.json +61 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +84 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.js +3 -0
- package/src/generators/init/schema.d.js.map +1 -0
- package/src/generators/init/schema.d.ts +4 -0
- package/src/generators/init/schema.json +22 -0
- package/src/generators/vitest/files/tsconfig.spec.json__tmpl__ +19 -0
- package/src/generators/vitest/schema.d.js +3 -0
- package/src/generators/vitest/schema.d.js.map +1 -0
- package/src/generators/vitest/schema.d.ts +9 -0
- package/src/generators/vitest/schema.json +49 -0
- package/src/generators/vitest/vitest-generator.d.ts +5 -0
- package/src/generators/vitest/vitest-generator.js +99 -0
- package/src/generators/vitest/vitest-generator.js.map +1 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.d.ts +3 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.js +63 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.js.map +1 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.d.ts +3 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.js +33 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.js.map +1 -0
- package/src/migrations/update-15-4-3/update-report-directory.d.ts +3 -0
- package/src/migrations/update-15-4-3/update-report-directory.js +35 -0
- package/src/migrations/update-15-4-3/update-report-directory.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/generator-utils.d.ts +34 -0
- package/src/utils/generator-utils.js +567 -0
- package/src/utils/generator-utils.js.map +1 -0
- package/src/utils/options-utils.d.ts +32 -0
- package/src/utils/options-utils.js +113 -0
- package/src/utils/options-utils.js.map +1 -0
- package/src/utils/test-files/angular-project.config.json +89 -0
- package/src/utils/test-files/react-lib-non-buildable-jest.json +25 -0
- package/src/utils/test-files/react-lib-non-buildable-vitest.json +25 -0
- package/src/utils/test-files/react-mixed-project.config.json +52 -0
- package/src/utils/test-files/react-project.config.json +85 -0
- package/src/utils/test-files/react-vite-project.config.json +57 -0
- package/src/utils/test-files/test-vite-configs.d.ts +32 -0
- package/src/utils/test-files/test-vite-configs.js +285 -0
- package/src/utils/test-files/test-vite-configs.js.map +1 -0
- package/src/utils/test-files/unknown-project.config.json +72 -0
- package/src/utils/test-files/web-project.config.json +72 -0
- package/src/utils/test-utils.d.ts +9 -0
- package/src/utils/test-utils.js +516 -0
- package/src/utils/test-utils.js.map +1 -0
- package/src/utils/versions.d.ts +13 -0
- package/src/utils/versions.js +37 -0
- package/src/utils/versions.js.map +1 -0
- package/src/utils/vite-config-edit-utils.d.ts +3 -0
- package/src/utils/vite-config-edit-utils.js +286 -0
- package/src/utils/vite-config-edit-utils.js.map +1 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
|
|
2
|
+
|
|
3
|
+
<div style="text-align: center;">
|
|
4
|
+
|
|
5
|
+
[](https://circleci.com/gh/nrwl/nx)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://www.npmjs.com/@nrwl/workspace)
|
|
8
|
+
[]()
|
|
9
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
10
|
+
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
11
|
+
[](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<hr>
|
|
17
|
+
|
|
18
|
+
# Nx: Smart, Fast and Extensible Build System
|
|
19
|
+
|
|
20
|
+
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
21
|
+
|
|
22
|
+
This package is a [Vite plugin for Nx](https://nx.dev/packages/vite).
|
|
23
|
+
|
|
24
|
+
## Getting Started
|
|
25
|
+
|
|
26
|
+
### Creating an Nx Workspace
|
|
27
|
+
|
|
28
|
+
**Using `npx`**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx create-nx-workspace
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Using `npm init`**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm init nx-workspace
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Using `yarn create`**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn create nx-workspace
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
47
|
+
|
|
48
|
+
Run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx nx@latest init
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Documentation & Resources
|
|
55
|
+
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
59
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
60
|
+
|
|
61
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
62
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
63
|
+
|
package/executors.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type ViteBuildExecutorOptions } from './src/executors/build/schema';
|
|
2
|
+
export { viteBuildExecutor } from './src/executors/build/build.impl';
|
|
3
|
+
export { type ViteDevServerExecutorOptions } from './src/executors/dev-server/schema';
|
|
4
|
+
export { viteDevServerExecutor } from './src/executors/dev-server/dev-server.impl';
|
|
5
|
+
export { type VitePreviewServerExecutorOptions } from './src/executors/preview-server/schema';
|
|
6
|
+
export { vitePreviewServerExecutor } from './src/executors/preview-server/preview-server.impl';
|
|
7
|
+
export { type VitestExecutorOptions } from './src/executors/test/schema';
|
|
8
|
+
export { vitestExecutor } from './src/executors/test/vitest.impl';
|
package/executors.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _export(target, all) {
|
|
3
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: all[name]
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
_export(exports, {
|
|
9
|
+
viteBuildExecutor: ()=>_buildImpl.viteBuildExecutor,
|
|
10
|
+
viteDevServerExecutor: ()=>_devServerImpl.viteDevServerExecutor,
|
|
11
|
+
vitePreviewServerExecutor: ()=>_previewServerImpl.vitePreviewServerExecutor,
|
|
12
|
+
vitestExecutor: ()=>_vitestImpl.vitestExecutor
|
|
13
|
+
});
|
|
14
|
+
const _buildImpl = require("./src/executors/build/build.impl");
|
|
15
|
+
const _devServerImpl = require("./src/executors/dev-server/dev-server.impl");
|
|
16
|
+
const _previewServerImpl = require("./src/executors/preview-server/preview-server.impl");
|
|
17
|
+
const _vitestImpl = require("./src/executors/test/vitest.impl");
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=executors.js.map
|
package/executors.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/vite/executors.ts"],"sourcesContent":["export { type ViteBuildExecutorOptions } from './src/executors/build/schema';\nexport { viteBuildExecutor } from './src/executors/build/build.impl';\nexport { type ViteDevServerExecutorOptions } from './src/executors/dev-server/schema';\nexport { viteDevServerExecutor } from './src/executors/dev-server/dev-server.impl';\nexport { type VitePreviewServerExecutorOptions } from './src/executors/preview-server/schema';\nexport { vitePreviewServerExecutor } from './src/executors/preview-server/preview-server.impl';\nexport { type VitestExecutorOptions } from './src/executors/test/schema';\nexport { vitestExecutor } from './src/executors/test/vitest.impl';\n"],"names":["viteBuildExecutor","viteDevServerExecutor","vitePreviewServerExecutor","vitestExecutor"],"mappings":"AAAA;;;;;;;;IACSA,iBAAiB,MAAjBA,4BAAiB;IAEjBC,qBAAqB,MAArBA,oCAAqB;IAErBC,yBAAyB,MAAzBA,4CAAyB;IAEzBC,cAAc,MAAdA,0BAAc;;2BANW;+BAEI;mCAEI;4BAEX"}
|
package/executors.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"builders": {
|
|
3
|
+
"dev-server": {
|
|
4
|
+
"implementation": "./src/executors/dev-server/compat",
|
|
5
|
+
"schema": "./src/executors/dev-server/schema.json",
|
|
6
|
+
"description": "Vite dev server."
|
|
7
|
+
},
|
|
8
|
+
"build": {
|
|
9
|
+
"implementation": "./src/executors/build/compat",
|
|
10
|
+
"schema": "./src/executors/build/schema.json",
|
|
11
|
+
"description": "Build with Vite."
|
|
12
|
+
},
|
|
13
|
+
"test": {
|
|
14
|
+
"implementation": "./src/executors/test/compat",
|
|
15
|
+
"schema": "./src/executors/test/schema.json",
|
|
16
|
+
"description": "Test with Vitest"
|
|
17
|
+
},
|
|
18
|
+
"preview-server": {
|
|
19
|
+
"implementation": "./src/executors/preview-server/compat",
|
|
20
|
+
"schema": "./src/executors/preview-server/schema.json",
|
|
21
|
+
"description": "Vite preview server"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"executors": {
|
|
25
|
+
"dev-server": {
|
|
26
|
+
"implementation": "./src/executors/dev-server/dev-server.impl",
|
|
27
|
+
"schema": "./src/executors/dev-server/schema.json",
|
|
28
|
+
"description": "Vite dev server."
|
|
29
|
+
},
|
|
30
|
+
"build": {
|
|
31
|
+
"implementation": "./src/executors/build/build.impl",
|
|
32
|
+
"schema": "./src/executors/build/schema.json",
|
|
33
|
+
"description": "Build with Vite."
|
|
34
|
+
},
|
|
35
|
+
"test": {
|
|
36
|
+
"implementation": "./src/executors/test/vitest.impl",
|
|
37
|
+
"schema": "./src/executors/test/schema.json",
|
|
38
|
+
"description": "Test with Vitest"
|
|
39
|
+
},
|
|
40
|
+
"preview-server": {
|
|
41
|
+
"implementation": "./src/executors/preview-server/preview-server.impl",
|
|
42
|
+
"schema": "./src/executors/preview-server/schema.json",
|
|
43
|
+
"description": "Vite preview server"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/generators.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Nx Vite",
|
|
3
|
+
"version": "0.1",
|
|
4
|
+
"schematics": {
|
|
5
|
+
"init": {
|
|
6
|
+
"factory": "./src/generators/init/init#initSchematic",
|
|
7
|
+
"schema": "./src/generators/init/schema.json",
|
|
8
|
+
"description": "Initialize Vite in the workspace.",
|
|
9
|
+
"aliases": ["ng-add"],
|
|
10
|
+
"hidden": true
|
|
11
|
+
},
|
|
12
|
+
"configuration": {
|
|
13
|
+
"factory": "./src/generators/configuration/configuration#configurationSchematic",
|
|
14
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
15
|
+
"description": "Configure a project to use Vite.js.",
|
|
16
|
+
"aliases": ["config"],
|
|
17
|
+
"hidden": false
|
|
18
|
+
},
|
|
19
|
+
"vitest": {
|
|
20
|
+
"factory": "./src/generators/vitest/vitest-generator#vitestSchematic",
|
|
21
|
+
"schema": "./src/generators/vitest/schema.json",
|
|
22
|
+
"description": "Generate a vitest configuration"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"generators": {
|
|
26
|
+
"init": {
|
|
27
|
+
"factory": "./src/generators/init/init",
|
|
28
|
+
"schema": "./src/generators/init/schema.json",
|
|
29
|
+
"description": "Initialize Vite in the workspace.",
|
|
30
|
+
"aliases": ["ng-add"],
|
|
31
|
+
"hidden": true
|
|
32
|
+
},
|
|
33
|
+
"configuration": {
|
|
34
|
+
"factory": "./src/generators/configuration/configuration",
|
|
35
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
36
|
+
"description": "Add Vite configuration to an application.",
|
|
37
|
+
"aliases": ["config"],
|
|
38
|
+
"hidden": false
|
|
39
|
+
},
|
|
40
|
+
"vitest": {
|
|
41
|
+
"factory": "./src/generators/vitest/vitest-generator",
|
|
42
|
+
"schema": "./src/generators/vitest/schema.json",
|
|
43
|
+
"description": "Generate a vitest configuration"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './src/utils/versions';
|
|
2
|
+
export * from './src/utils/generator-utils';
|
|
3
|
+
export { type ViteConfigurationGeneratorSchema } from './src/generators/configuration/schema';
|
|
4
|
+
export { viteConfigurationGenerator } from './src/generators/configuration/configuration';
|
|
5
|
+
export { type VitestGeneratorSchema } from './src/generators/vitest/schema';
|
|
6
|
+
export { vitestGenerator } from './src/generators/vitest/vitest-generator';
|
|
7
|
+
export { type InitGeneratorSchema } from './src/generators/init/schema';
|
|
8
|
+
export { initGenerator } from './src/generators/init/init';
|
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _export(target, all) {
|
|
3
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: all[name]
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
_export(exports, {
|
|
9
|
+
viteConfigurationGenerator: ()=>_configuration.viteConfigurationGenerator,
|
|
10
|
+
vitestGenerator: ()=>_vitestGenerator.vitestGenerator,
|
|
11
|
+
initGenerator: ()=>_init.initGenerator
|
|
12
|
+
});
|
|
13
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
14
|
+
_exportStar(require("./src/utils/versions"), exports);
|
|
15
|
+
_exportStar(require("./src/utils/generator-utils"), exports);
|
|
16
|
+
const _configuration = require("./src/generators/configuration/configuration");
|
|
17
|
+
const _vitestGenerator = require("./src/generators/vitest/vitest-generator");
|
|
18
|
+
const _init = require("./src/generators/init/init");
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/vite/index.ts"],"sourcesContent":["export * from './src/utils/versions';\nexport * from './src/utils/generator-utils';\nexport { type ViteConfigurationGeneratorSchema } from './src/generators/configuration/schema';\nexport { viteConfigurationGenerator } from './src/generators/configuration/configuration';\nexport { type VitestGeneratorSchema } from './src/generators/vitest/schema';\nexport { vitestGenerator } from './src/generators/vitest/vitest-generator';\nexport { type InitGeneratorSchema } from './src/generators/init/schema';\nexport { initGenerator } from './src/generators/init/init';\n"],"names":["viteConfigurationGenerator","vitestGenerator","initGenerator"],"mappings":"AAAA;;;;;;;;IAGSA,0BAA0B,MAA1BA,yCAA0B;IAE1BC,eAAe,MAAfA,gCAAe;IAEfC,aAAa,MAAbA,mBAAa;;;oBAPR;oBACA;+BAE6B;iCAEX;sBAEF"}
|
package/migrations.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generators": {
|
|
3
|
+
"update-vite-tsconfig-paths": {
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"version": "15.3.1-beta.0",
|
|
6
|
+
"description": "Remove projects property from vite-tsconfig-paths plugin in vite.config.ts files.",
|
|
7
|
+
"factory": "./src/migrations/update-15-3-1/update-vite-tsconfig-paths"
|
|
8
|
+
},
|
|
9
|
+
"set-mode-in-configurations": {
|
|
10
|
+
"cli": "nx",
|
|
11
|
+
"version": "15.3.4-beta.0",
|
|
12
|
+
"description": "Set the mode in configurations to match the configurationName.",
|
|
13
|
+
"factory": "./src/migrations/update-15-3-4/set-mode-in-configuration"
|
|
14
|
+
},
|
|
15
|
+
"update-test-path-placeholder-vars": {
|
|
16
|
+
"cli": "nx",
|
|
17
|
+
"version": "15.4.3-beta.0",
|
|
18
|
+
"description": "Update @nrwl/vite:test reportsDirectory and outputs properties to point to correct paths.",
|
|
19
|
+
"factory": "./src/migrations/update-15-4-3/update-report-directory"
|
|
20
|
+
},
|
|
21
|
+
"update-16-0-0-add-nx-packages": {
|
|
22
|
+
"cli": "nx",
|
|
23
|
+
"version": "16.0.0-beta.1",
|
|
24
|
+
"description": "Replace @nrwl/vite with @nx/vite",
|
|
25
|
+
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"packageJsonUpdates": {
|
|
29
|
+
"15.3.1-beta.0": {
|
|
30
|
+
"version": "15.3.1-beta.0",
|
|
31
|
+
"packages": {
|
|
32
|
+
"vite-tsconfig-paths": {
|
|
33
|
+
"version": "4.0.0",
|
|
34
|
+
"alwaysAddToPackageJson": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"15.3.4-beta.0": {
|
|
39
|
+
"version": "15.3.4-beta.0",
|
|
40
|
+
"packages": {
|
|
41
|
+
"vite": {
|
|
42
|
+
"version": "^4.0.1",
|
|
43
|
+
"alwaysAddToPackageJson": false
|
|
44
|
+
},
|
|
45
|
+
"vite-tsconfig-paths": {
|
|
46
|
+
"version": "^4.0.2",
|
|
47
|
+
"alwaysAddToPackageJson": false
|
|
48
|
+
},
|
|
49
|
+
"vite-plugin-eslint": {
|
|
50
|
+
"version": "^1.8.1",
|
|
51
|
+
"alwaysAddToPackageJson": false
|
|
52
|
+
},
|
|
53
|
+
"vitest": {
|
|
54
|
+
"version": "^0.25.8",
|
|
55
|
+
"alwaysAddToPackageJson": false
|
|
56
|
+
},
|
|
57
|
+
"vite-plugin-dts": {
|
|
58
|
+
"version": "~1.7.1",
|
|
59
|
+
"alwaysAddToPackageJson": false
|
|
60
|
+
},
|
|
61
|
+
"@vitejs/plugin-react": {
|
|
62
|
+
"version": "^3.0.0",
|
|
63
|
+
"alwaysAddToPackageJson": false
|
|
64
|
+
},
|
|
65
|
+
"@vitest/coverage-c8": {
|
|
66
|
+
"version": "^0.25.8",
|
|
67
|
+
"alwaysAddToPackageJson": false
|
|
68
|
+
},
|
|
69
|
+
"@vitest/ui": {
|
|
70
|
+
"version": "^0.25.8",
|
|
71
|
+
"alwaysAddToPackageJson": false
|
|
72
|
+
},
|
|
73
|
+
"@vitest/coverage-istanbul": {
|
|
74
|
+
"version": "^0.25.8",
|
|
75
|
+
"alwaysAddToPackageJson": false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nx/vite",
|
|
3
|
+
"version": "16.0.0-beta.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "The Nx Plugin for building and testing applications using Vite",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/nrwl/nx.git",
|
|
9
|
+
"directory": "packages/vite"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"Monorepo",
|
|
13
|
+
"Vite",
|
|
14
|
+
"Web",
|
|
15
|
+
"CLI"
|
|
16
|
+
],
|
|
17
|
+
"main": "./index",
|
|
18
|
+
"typings": "./index.d.ts",
|
|
19
|
+
"author": "Victor Savkin",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/nrwl/nx/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://nx.dev",
|
|
25
|
+
"schematics": "./generators.json",
|
|
26
|
+
"builders": "./executors.json",
|
|
27
|
+
"ng-update": {
|
|
28
|
+
"requirements": {},
|
|
29
|
+
"migrations": "./migrations.json"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@nrwl/vite": "16.0.0-beta.1",
|
|
33
|
+
"@nx/devkit": "16.0.0-beta.1",
|
|
34
|
+
"@nx/js": "16.0.0-beta.1",
|
|
35
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
36
|
+
"@swc/helpers": "^0.4.11",
|
|
37
|
+
"dotenv": "~10.0.0",
|
|
38
|
+
"enquirer": "~2.3.6"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"vite": "^4.0.1",
|
|
42
|
+
"vitest": ">=0.25.8 <1.0.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"require": "./index.js"
|
|
50
|
+
},
|
|
51
|
+
"./package.json": {
|
|
52
|
+
"require": "./package.json"
|
|
53
|
+
},
|
|
54
|
+
"./executors": "./executors.js",
|
|
55
|
+
"./src/executors/*/schema.json": "./src/executors/*/schema.json",
|
|
56
|
+
"./src/executors/*.impl": "./src/executors/*.impl.js",
|
|
57
|
+
"./src/executors/*/compat": "./src/executors/*/compat.js"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "abf534c265f5aa3aac146e55bb31de598ea281d7"
|
|
60
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @function replaceFiles
|
|
3
|
+
* @param {FileReplacement[]} replacements
|
|
4
|
+
* @return {({name: "rollup-plugin-replace-files", enforce: "pre", Promise<resolveId>})}
|
|
5
|
+
*/
|
|
6
|
+
export default function replaceFiles(replacements: FileReplacement[]): {
|
|
7
|
+
name: string;
|
|
8
|
+
enforce: string;
|
|
9
|
+
resolveId(source: any, importer: any, options: any): Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export interface FileReplacement {
|
|
14
|
+
replace: string;
|
|
15
|
+
with: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// source: https://github.com/Myrmod/vitejs-theming/blob/master/build-plugins/rollup/replace-files.js
|
|
2
|
+
/**
|
|
3
|
+
* @function replaceFiles
|
|
4
|
+
* @param {FileReplacement[]} replacements
|
|
5
|
+
* @return {({name: "rollup-plugin-replace-files", enforce: "pre", Promise<resolveId>})}
|
|
6
|
+
*/ "use strict";
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: ()=>replaceFiles
|
|
10
|
+
});
|
|
11
|
+
const _extends = require("@swc/helpers/lib/_extends.js").default;
|
|
12
|
+
function replaceFiles(replacements) {
|
|
13
|
+
if (!(replacements == null ? void 0 : replacements.length)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
name: 'rollup-plugin-replace-files',
|
|
18
|
+
enforce: 'pre',
|
|
19
|
+
async resolveId (source, importer, options) {
|
|
20
|
+
const resolved = await this.resolve(source, importer, _extends({}, options, {
|
|
21
|
+
skipSelf: true
|
|
22
|
+
}));
|
|
23
|
+
/**
|
|
24
|
+
* The reason we're using endsWith here is because the resolved id
|
|
25
|
+
* will be the absolute path to the file. We want to check if the
|
|
26
|
+
* file ends with the file we're trying to replace, which will be essentially
|
|
27
|
+
* the path from the root of our workspace.
|
|
28
|
+
*/ const foundReplace = replacements.find((replacement)=>{
|
|
29
|
+
var ref;
|
|
30
|
+
return resolved == null ? void 0 : (ref = resolved.id) == null ? void 0 : ref.endsWith(replacement.replace);
|
|
31
|
+
});
|
|
32
|
+
if (foundReplace) {
|
|
33
|
+
console.info(`replace "${foundReplace.replace}" with "${foundReplace.with}"`);
|
|
34
|
+
try {
|
|
35
|
+
// return new file content
|
|
36
|
+
return {
|
|
37
|
+
id: foundReplace.with
|
|
38
|
+
};
|
|
39
|
+
} catch (err) {
|
|
40
|
+
console.error(err);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=rollup-replace-files.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../packages/vite/plugins/rollup-replace-files.plugin.ts"],"sourcesContent":["// source: https://github.com/Myrmod/vitejs-theming/blob/master/build-plugins/rollup/replace-files.js\n\n/**\n * @function replaceFiles\n * @param {FileReplacement[]} replacements\n * @return {({name: \"rollup-plugin-replace-files\", enforce: \"pre\", Promise<resolveId>})}\n */\nexport default function replaceFiles(replacements: FileReplacement[]) {\n if (!replacements?.length) {\n return null;\n }\n return {\n name: 'rollup-plugin-replace-files',\n enforce: 'pre',\n async resolveId(source, importer, options) {\n const resolved = await this.resolve(source, importer, {\n ...options,\n skipSelf: true,\n });\n /**\n * The reason we're using endsWith here is because the resolved id\n * will be the absolute path to the file. We want to check if the\n * file ends with the file we're trying to replace, which will be essentially\n * the path from the root of our workspace.\n */\n\n const foundReplace = replacements.find((replacement) =>\n resolved?.id?.endsWith(replacement.replace)\n );\n if (foundReplace) {\n console.info(\n `replace \"${foundReplace.replace}\" with \"${foundReplace.with}\"`\n );\n try {\n // return new file content\n return {\n id: foundReplace.with,\n };\n } catch (err) {\n console.error(err);\n return null;\n }\n }\n return null;\n },\n };\n}\n\nexport interface FileReplacement {\n replace: string;\n with: string;\n}\n"],"names":["replaceFiles","replacements","length","name","enforce","resolveId","source","importer","options","resolved","resolve","skipSelf","foundReplace","find","replacement","id","endsWith","replace","console","info","with","err","error"],"mappings":"AAAA,qGAAqG;AAErG;;;;CAIC,GACD;+BAAA;;aAAwBA;;;AAAT,SAASA,aAAaC,YAA+B,EAAE;IACpE,IAAI,CAACA,CAAAA,uBAAAA,KAAAA,IAAAA,aAAcC,MAAM,AAAD,GAAG;QACzB,OAAO,IAAI;IACb,CAAC;IACD,OAAO;QACLC,MAAM;QACNC,SAAS;QACT,MAAMC,WAAUC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE;YACzC,MAAMC,WAAW,MAAM,IAAI,CAACC,OAAO,CAACJ,QAAQC,UAAU,aACjDC;gBACHG,UAAU,IAAI;;YAEhB;;;;;OAKC,GAED,MAAMC,eAAeX,aAAaY,IAAI,CAAC,CAACC;oBACtCL;gBAAAA,OAAAA,mBAAAA,KAAAA,IAAAA,CAAAA,MAAAA,SAAUM,EAAE,YAAZN,KAAAA,IAAAA,IAAcO,SAASF,YAAYG,OAAO;;YAE5C,IAAIL,cAAc;gBAChBM,QAAQC,IAAI,CACV,CAAC,SAAS,EAAEP,aAAaK,OAAO,CAAC,QAAQ,EAAEL,aAAaQ,IAAI,CAAC,CAAC,CAAC;gBAEjE,IAAI;oBACF,0BAA0B;oBAC1B,OAAO;wBACLL,IAAIH,aAAaQ,IAAI;oBACvB;gBACF,EAAE,OAAOC,KAAK;oBACZH,QAAQI,KAAK,CAACD;oBACd,OAAO,IAAI;gBACb;YACF,CAAC;YACD,OAAO,IAAI;QACb;IACF;AACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
3
|
+
import { ViteBuildExecutorOptions } from './schema';
|
|
4
|
+
export declare function viteBuildExecutor(options: ViteBuildExecutorOptions, context: ExecutorContext): AsyncGenerator<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
success: boolean;
|
|
8
|
+
outfile: string;
|
|
9
|
+
}, void, undefined>;
|
|
10
|
+
export default viteBuildExecutor;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _export(target, all) {
|
|
3
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: all[name]
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
_export(exports, {
|
|
9
|
+
viteBuildExecutor: ()=>viteBuildExecutor,
|
|
10
|
+
default: ()=>_default
|
|
11
|
+
});
|
|
12
|
+
const _extends = require("@swc/helpers/lib/_extends.js").default;
|
|
13
|
+
require("dotenv/config");
|
|
14
|
+
const _vite = require("vite");
|
|
15
|
+
const _optionsUtils = require("../../utils/options-utils");
|
|
16
|
+
const _js = require("@nx/js");
|
|
17
|
+
const _fs = require("fs");
|
|
18
|
+
const _path = require("path");
|
|
19
|
+
const _asyncIterable = require("@nx/devkit/src/utils/async-iterable");
|
|
20
|
+
const _register = require("nx/src/utils/register");
|
|
21
|
+
async function* viteBuildExecutor(options, context) {
|
|
22
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
23
|
+
(0, _register.registerTsConfigPaths)((0, _path.resolve)(projectRoot, 'tsconfig.json'));
|
|
24
|
+
const normalizedOptions = normalizeOptions(options);
|
|
25
|
+
const buildConfig = (0, _vite.mergeConfig)((0, _optionsUtils.getViteSharedConfig)(normalizedOptions, false, context), {
|
|
26
|
+
build: (0, _optionsUtils.getViteBuildOptions)(normalizedOptions, context)
|
|
27
|
+
});
|
|
28
|
+
const watcherOrOutput = await runInstance(buildConfig);
|
|
29
|
+
const libraryPackageJson = (0, _path.resolve)(projectRoot, 'package.json');
|
|
30
|
+
const rootPackageJson = (0, _path.resolve)(context.root, 'package.json');
|
|
31
|
+
// For buildable libs, copy package.json if it exists.
|
|
32
|
+
if ((0, _fs.existsSync)(libraryPackageJson) && rootPackageJson !== libraryPackageJson) {
|
|
33
|
+
await (0, _js.copyAssets)({
|
|
34
|
+
outputPath: normalizedOptions.outputPath,
|
|
35
|
+
assets: [
|
|
36
|
+
{
|
|
37
|
+
input: projectRoot,
|
|
38
|
+
output: '.',
|
|
39
|
+
glob: 'package.json'
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}, context);
|
|
43
|
+
}
|
|
44
|
+
if ('on' in watcherOrOutput) {
|
|
45
|
+
const iterable = (0, _asyncIterable.createAsyncIterable)(({ next })=>{
|
|
46
|
+
let success = true;
|
|
47
|
+
watcherOrOutput.on('event', (event)=>{
|
|
48
|
+
if (event.code === 'START') {
|
|
49
|
+
success = true;
|
|
50
|
+
} else if (event.code === 'ERROR') {
|
|
51
|
+
success = false;
|
|
52
|
+
} else if (event.code === 'END') {
|
|
53
|
+
next({
|
|
54
|
+
success
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
// result must be closed when present.
|
|
58
|
+
// see https://rollupjs.org/guide/en/#rollupwatch
|
|
59
|
+
if ('result' in event) {
|
|
60
|
+
event.result.close();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
yield* iterable;
|
|
65
|
+
} else {
|
|
66
|
+
var ref, ref1;
|
|
67
|
+
const output = (watcherOrOutput == null ? void 0 : watcherOrOutput['output']) || (watcherOrOutput == null ? void 0 : (ref = watcherOrOutput[0]) == null ? void 0 : ref.output);
|
|
68
|
+
const fileName = (output == null ? void 0 : (ref1 = output[0]) == null ? void 0 : ref1.fileName) || 'main.cjs';
|
|
69
|
+
const outfile = (0, _path.resolve)(normalizedOptions.outputPath, fileName);
|
|
70
|
+
yield {
|
|
71
|
+
success: true,
|
|
72
|
+
outfile
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function runInstance(options) {
|
|
77
|
+
return (0, _vite.build)(_extends({}, options));
|
|
78
|
+
}
|
|
79
|
+
function normalizeOptions(options) {
|
|
80
|
+
const normalizedOptions = _extends({}, options);
|
|
81
|
+
// coerce watch to null or {} to match with Vite's watch config
|
|
82
|
+
if (options.watch === false) {
|
|
83
|
+
normalizedOptions.watch = null;
|
|
84
|
+
} else if (options.watch === true) {
|
|
85
|
+
normalizedOptions.watch = {};
|
|
86
|
+
}
|
|
87
|
+
return normalizedOptions;
|
|
88
|
+
}
|
|
89
|
+
const _default = viteBuildExecutor;
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=build.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/vite/src/executors/build/build.impl.ts"],"sourcesContent":["import 'dotenv/config';\nimport { ExecutorContext } from '@nx/devkit';\nimport { build, InlineConfig, mergeConfig } from 'vite';\nimport {\n getViteBuildOptions,\n getViteSharedConfig,\n} from '../../utils/options-utils';\nimport { ViteBuildExecutorOptions } from './schema';\nimport { copyAssets } from '@nx/js';\nimport { existsSync } from 'fs';\nimport { resolve } from 'path';\nimport { createAsyncIterable } from '@nx/devkit/src/utils/async-iterable';\n\nimport { registerTsConfigPaths } from 'nx/src/utils/register';\n\nexport async function* viteBuildExecutor(\n options: ViteBuildExecutorOptions,\n context: ExecutorContext\n) {\n const projectRoot =\n context.projectsConfigurations.projects[context.projectName].root;\n\n registerTsConfigPaths(resolve(projectRoot, 'tsconfig.json'));\n\n const normalizedOptions = normalizeOptions(options);\n\n const buildConfig = mergeConfig(\n getViteSharedConfig(normalizedOptions, false, context),\n {\n build: getViteBuildOptions(normalizedOptions, context),\n }\n );\n\n const watcherOrOutput = await runInstance(buildConfig);\n\n const libraryPackageJson = resolve(projectRoot, 'package.json');\n const rootPackageJson = resolve(context.root, 'package.json');\n\n // For buildable libs, copy package.json if it exists.\n if (\n existsSync(libraryPackageJson) &&\n rootPackageJson !== libraryPackageJson\n ) {\n await copyAssets(\n {\n outputPath: normalizedOptions.outputPath,\n assets: [\n {\n input: projectRoot,\n output: '.',\n glob: 'package.json',\n },\n ],\n },\n context\n );\n }\n\n if ('on' in watcherOrOutput) {\n const iterable = createAsyncIterable<{ success: boolean }>(({ next }) => {\n let success = true;\n watcherOrOutput.on('event', (event) => {\n if (event.code === 'START') {\n success = true;\n } else if (event.code === 'ERROR') {\n success = false;\n } else if (event.code === 'END') {\n next({ success });\n }\n // result must be closed when present.\n // see https://rollupjs.org/guide/en/#rollupwatch\n if ('result' in event) {\n event.result.close();\n }\n });\n });\n yield* iterable;\n } else {\n const output = watcherOrOutput?.['output'] || watcherOrOutput?.[0]?.output;\n const fileName = output?.[0]?.fileName || 'main.cjs';\n const outfile = resolve(normalizedOptions.outputPath, fileName);\n yield { success: true, outfile };\n }\n}\n\nfunction runInstance(options: InlineConfig) {\n return build({\n ...options,\n });\n}\n\nfunction normalizeOptions(options: ViteBuildExecutorOptions) {\n const normalizedOptions = { ...options };\n\n // coerce watch to null or {} to match with Vite's watch config\n if (options.watch === false) {\n normalizedOptions.watch = null;\n } else if (options.watch === true) {\n normalizedOptions.watch = {};\n }\n\n return normalizedOptions;\n}\n\nexport default viteBuildExecutor;\n"],"names":["viteBuildExecutor","options","context","projectRoot","projectsConfigurations","projects","projectName","root","registerTsConfigPaths","resolve","normalizedOptions","normalizeOptions","buildConfig","mergeConfig","getViteSharedConfig","build","getViteBuildOptions","watcherOrOutput","runInstance","libraryPackageJson","rootPackageJson","existsSync","copyAssets","outputPath","assets","input","output","glob","iterable","createAsyncIterable","next","success","on","event","code","result","close","fileName","outfile","watch"],"mappings":"AAAA;;;;;;;;IAeuBA,iBAAiB,MAAjBA;IAyFvB,OAAiC,MAAjC;;;QAxGO;sBAE0C;8BAI1C;oBAEoB;oBACA;sBACH;+BACY;0BAEE;AAE/B,gBAAgBA,kBACrBC,OAAiC,EACjCC,OAAwB,EACxB;IACA,MAAMC,cACJD,QAAQE,sBAAsB,CAACC,QAAQ,CAACH,QAAQI,WAAW,CAAC,CAACC,IAAI;IAEnEC,IAAAA,+BAAqB,EAACC,IAAAA,aAAO,EAACN,aAAa;IAE3C,MAAMO,oBAAoBC,iBAAiBV;IAE3C,MAAMW,cAAcC,IAAAA,iBAAW,EAC7BC,IAAAA,iCAAmB,EAACJ,mBAAmB,KAAK,EAAER,UAC9C;QACEa,OAAOC,IAAAA,iCAAmB,EAACN,mBAAmBR;IAChD;IAGF,MAAMe,kBAAkB,MAAMC,YAAYN;IAE1C,MAAMO,qBAAqBV,IAAAA,aAAO,EAACN,aAAa;IAChD,MAAMiB,kBAAkBX,IAAAA,aAAO,EAACP,QAAQK,IAAI,EAAE;IAE9C,sDAAsD;IACtD,IACEc,IAAAA,cAAU,EAACF,uBACXC,oBAAoBD,oBACpB;QACA,MAAMG,IAAAA,cAAU,EACd;YACEC,YAAYb,kBAAkBa,UAAU;YACxCC,QAAQ;gBACN;oBACEC,OAAOtB;oBACPuB,QAAQ;oBACRC,MAAM;gBACR;aACD;QACH,GACAzB;IAEJ,CAAC;IAED,IAAI,QAAQe,iBAAiB;QAC3B,MAAMW,WAAWC,IAAAA,kCAAmB,EAAuB,CAAC,EAAEC,KAAI,EAAE,GAAK;YACvE,IAAIC,UAAU,IAAI;YAClBd,gBAAgBe,EAAE,CAAC,SAAS,CAACC,QAAU;gBACrC,IAAIA,MAAMC,IAAI,KAAK,SAAS;oBAC1BH,UAAU,IAAI;gBAChB,OAAO,IAAIE,MAAMC,IAAI,KAAK,SAAS;oBACjCH,UAAU,KAAK;gBACjB,OAAO,IAAIE,MAAMC,IAAI,KAAK,OAAO;oBAC/BJ,KAAK;wBAAEC;oBAAQ;gBACjB,CAAC;gBACD,sCAAsC;gBACtC,iDAAiD;gBACjD,IAAI,YAAYE,OAAO;oBACrBA,MAAME,MAAM,CAACC,KAAK;gBACpB,CAAC;YACH;QACF;QACA,OAAOR;IACT,OAAO;YACyCX,KAC7BS;QADjB,MAAMA,SAAST,CAAAA,0BAAAA,KAAAA,IAAAA,eAAiB,CAAC,SAAS,AAAD,KAAKA,CAAAA,0BAAAA,KAAAA,IAAAA,CAAAA,MAAAA,eAAiB,CAAC,EAAE,YAApBA,KAAAA,IAAAA,IAAsBS,MAAF,AAAD;QACjE,MAAMW,WAAWX,CAAAA,iBAAAA,KAAAA,IAAAA,CAAAA,OAAAA,MAAQ,CAAC,EAAE,YAAXA,KAAAA,IAAAA,KAAaW,QAAF,AAAD,KAAe;QAC1C,MAAMC,UAAU7B,IAAAA,aAAO,EAACC,kBAAkBa,UAAU,EAAEc;QACtD,MAAM;YAAEN,SAAS,IAAI;YAAEO;QAAQ;IACjC,CAAC;AACH;AAEA,SAASpB,YAAYjB,OAAqB,EAAE;IAC1C,OAAOc,IAAAA,WAAK,EAAC,aACRd;AAEP;AAEA,SAASU,iBAAiBV,OAAiC,EAAE;IAC3D,MAAMS,oBAAoB,aAAKT;IAE/B,+DAA+D;IAC/D,IAAIA,QAAQsC,KAAK,KAAK,KAAK,EAAE;QAC3B7B,kBAAkB6B,KAAK,GAAG,IAAI;IAChC,OAAO,IAAItC,QAAQsC,KAAK,KAAK,IAAI,EAAE;QACjC7B,kBAAkB6B,KAAK,GAAG,CAAC;IAC7B,CAAC;IAED,OAAO7B;AACT;MAEA,WAAeV"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "default", {
|
|
3
|
+
enumerable: true,
|
|
4
|
+
get: ()=>_default
|
|
5
|
+
});
|
|
6
|
+
const _devkit = require("@nx/devkit");
|
|
7
|
+
const _buildImpl = require("./build.impl");
|
|
8
|
+
const _default = (0, _devkit.convertNxExecutor)(_buildImpl.default);
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/vite/src/executors/build/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\nimport viteBuildExecutor from './build.impl';\n\nexport default convertNxExecutor(viteBuildExecutor);\n"],"names":["convertNxExecutor","viteBuildExecutor"],"mappings":"AAAA;+BAGA;;aAAA;;wBAHkC;2BACJ;MAE9B,WAAeA,IAAAA,yBAAiB,EAACC,kBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/vite/src/executors/build/schema.d.ts"],"sourcesContent":["import type { FileReplacement } from '../../plugins/rollup-replace-files.plugin';\nexport interface ViteBuildExecutorOptions {\n outputPath: string;\n emptyOutDir?: boolean;\n base?: string;\n configFile?: string;\n fileReplacements?: FileReplacement[];\n force?: boolean;\n sourcemap?: boolean | 'inline' | 'hidden';\n minify?: boolean | 'esbuild' | 'terser';\n manifest?: boolean | string;\n ssrManifest?: boolean | string;\n logLevel?: 'info' | 'warn' | 'error' | 'silent';\n mode?: string;\n ssr?: boolean | string;\n watch?: object | boolean;\n}\n"],"names":[],"mappings":"AAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileReplacement } from '../../plugins/rollup-replace-files.plugin';
|
|
2
|
+
export interface ViteBuildExecutorOptions {
|
|
3
|
+
outputPath: string;
|
|
4
|
+
emptyOutDir?: boolean;
|
|
5
|
+
base?: string;
|
|
6
|
+
configFile?: string;
|
|
7
|
+
fileReplacements?: FileReplacement[];
|
|
8
|
+
force?: boolean;
|
|
9
|
+
sourcemap?: boolean | 'inline' | 'hidden';
|
|
10
|
+
minify?: boolean | 'esbuild' | 'terser';
|
|
11
|
+
manifest?: boolean | string;
|
|
12
|
+
ssrManifest?: boolean | string;
|
|
13
|
+
logLevel?: 'info' | 'warn' | 'error' | 'silent';
|
|
14
|
+
mode?: string;
|
|
15
|
+
ssr?: boolean | string;
|
|
16
|
+
watch?: object | boolean;
|
|
17
|
+
}
|