Skip to content

Commit

Permalink
feat(preset-built-in): add env to disable app runtime plugin (#9579)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Oct 20, 2022
1 parent 93c73ef commit fa3f62a
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ export default function (api: IApi) {
],
});

const appRuntimeFilePath = getFile({
base: paths.absSrcPath!,
fileNameWithoutExt: 'app',
type: 'javascript',
})?.path;
const appRuntimeFilePath =
process.env.RUNTIME_APP_JS !== 'none'
? getFile({
base: paths.absSrcPath!,
fileNameWithoutExt: 'app',
type: 'javascript',
})?.path
: undefined;
const plugins = await api.applyPlugins({
key: 'addRuntimePlugin',
type: api.ApplyPluginsType.add,
Expand Down

0 comments on commit fa3f62a

Please sign in to comment.