Skip to content

Commit

Permalink
revert: import path
Browse files Browse the repository at this point in the history
  • Loading branch information
innerdvations committed Aug 13, 2024
1 parent 3ecd542 commit 15e7e72
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/cli/commands/plugin/init/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ const getPluginTemplate = ({ suggestedPackageName }: PluginTemplateOptions) => {
contents: outdent`
'use strict';
module.exports = require('./server/src');
module.exports = require('./dist/server');
`,
});
}
Expand Down Expand Up @@ -437,18 +437,6 @@ const getPluginTemplate = ({ suggestedPackageName }: PluginTemplateOptions) => {
serverTsconfigFiles.tsconfigBuildFile,
serverTsconfigFiles.tsconfigFile
);

// Replace the strapi-server import to use the dist directory
const fileToUpdate = files.find((file) => file.name === 'strapi-server.js');
if (fileToUpdate) {
fileToUpdate.contents = outdent`
'use strict';
module.exports = require('./dist/server');
`;
} else {
logger.error('File with name strapi-server.js not found.');
}
}

pkgJson.devDependencies = {
Expand Down

0 comments on commit 15e7e72

Please sign in to comment.