Fix PR feedback

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2022-03-10 17:01:14 +01:00
parent b25a2709a6
commit 1f994476fc
6 changed files with 12 additions and 25 deletions

View File

@ -7,7 +7,7 @@
"develop": "strapi develop",
"develop:ce": "STRAPI_DISABLE_EE=true strapi develop",
"start": "strapi start",
"build": "strapi build --no-optimization",
"build": "strapi build",
"build:ce": "STRAPI_DISABLE_EE=true strapi build",
"strapi": "strapi"
},

View File

@ -15,6 +15,7 @@
"noEmitOnError": true,
"resolveJsonModule": true
},
// TODO remove the include when we fix the pluginsPath
"include": ["src/plugins/**/*.json", "./"],
"exclude": ["node_modules/", "dist/", "src/admin", ".cache/", ".tmp/"]
}

View File

@ -1,18 +0,0 @@
{
"compilerOptions": {
"noImplicitAny": false,
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"noEmit": false,
"incremental": true
},
"exclude": ["node_modules", "**/*.test.js", "*.js"]
}

View File

@ -128,7 +128,6 @@ async function watchAdmin({
env,
options,
pluginsPath,
// port,
roots,
devServer: {
port,
@ -139,7 +138,6 @@ async function watchAdmin({
warnings: false,
},
},
open: browser === 'true' ? true : browser,
devMiddleware: {
publicPath: options.adminPath,

View File

@ -72,6 +72,7 @@
"execa": "^1.0.0",
"fast-deep-equal": "3.1.3",
"font-awesome": "^4.7.0",
"fork-ts-checker-webpack-plugin": "7.2.1",
"formik": "^2.2.6",
"fs-extra": "10.0.0",
"highlight.js": "^10.4.1",
@ -139,7 +140,6 @@
},
"devDependencies": {
"duplicate-dependencies-webpack-plugin": "0.2.0",
"fork-ts-checker-webpack-plugin": "7.2.1",
"webpack-bundle-analyzer": "4.4.1"
},
"engines": {

View File

@ -30,6 +30,7 @@ module.exports = async function({ build, watchAdmin, polling, browser }) {
dir: buildDestDir,
build,
browser,
isTSProject,
watchAdmin,
});
}
@ -43,9 +44,14 @@ module.exports = async function({ build, watchAdmin, polling, browser }) {
}
};
const primaryProcess = async ({ buildDestDir, currentDirectory, build, watchAdmin, browser }) => {
const isTSProject = await tsUtils.isTypeScriptProject(currentDirectory);
const primaryProcess = async ({
buildDestDir,
currentDirectory,
build,
isTSProject,
watchAdmin,
browser,
}) => {
if (isTSProject) {
await buildTypeScript({ srcDir: currentDirectory, watch: true });
}