Skip to content

Commit fa3f62a

Browse files
authored
feat(preset-built-in): add env to disable app runtime plugin (#9579)
1 parent 93c73ef commit fa3f62a

File tree

1 file changed

+8
-5
lines changed
  • packages/preset-built-in/src/plugins/generateFiles/core

1 file changed

+8
-5
lines changed

packages/preset-built-in/src/plugins/generateFiles/core/plugin.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ export default function (api: IApi) {
2424
],
2525
});
2626

27-
const appRuntimeFilePath = getFile({
28-
base: paths.absSrcPath!,
29-
fileNameWithoutExt: 'app',
30-
type: 'javascript',
31-
})?.path;
27+
const appRuntimeFilePath =
28+
process.env.RUNTIME_APP_JS !== 'none'
29+
? getFile({
30+
base: paths.absSrcPath!,
31+
fileNameWithoutExt: 'app',
32+
type: 'javascript',
33+
})?.path
34+
: undefined;
3235
const plugins = await api.applyPlugins({
3336
key: 'addRuntimePlugin',
3437
type: api.ApplyPluginsType.add,

0 commit comments

Comments
 (0)