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": "strapi develop",
"develop:ce": "STRAPI_DISABLE_EE=true strapi develop", "develop:ce": "STRAPI_DISABLE_EE=true strapi develop",
"start": "strapi start", "start": "strapi start",
"build": "strapi build --no-optimization", "build": "strapi build",
"build:ce": "STRAPI_DISABLE_EE=true strapi build", "build:ce": "STRAPI_DISABLE_EE=true strapi build",
"strapi": "strapi" "strapi": "strapi"
}, },

View File

@ -15,6 +15,7 @@
"noEmitOnError": true, "noEmitOnError": true,
"resolveJsonModule": true "resolveJsonModule": true
}, },
// TODO remove the include when we fix the pluginsPath
"include": ["src/plugins/**/*.json", "./"], "include": ["src/plugins/**/*.json", "./"],
"exclude": ["node_modules/", "dist/", "src/admin", ".cache/", ".tmp/"] "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, env,
options, options,
pluginsPath, pluginsPath,
// port,
roots, roots,
devServer: { devServer: {
port, port,
@ -139,7 +138,6 @@ async function watchAdmin({
warnings: false, warnings: false,
}, },
}, },
open: browser === 'true' ? true : browser, open: browser === 'true' ? true : browser,
devMiddleware: { devMiddleware: {
publicPath: options.adminPath, publicPath: options.adminPath,

View File

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

View File

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