From e05fe65e2dc58d2185723b639684557e6ffa641a Mon Sep 17 00:00:00 2001 From: virgoone Date: Wed, 3 Aug 2022 11:18:08 +0800 Subject: [PATCH] fix: import/no-unresolved rule --- package.json | 1 + pnpm-lock.yaml | 10 ++++++++++ src/webpack/webpack.config.js | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e602483..f3b7b56 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "deepmerge": "4.2.2", "esbuild": "^0.14.47", "esbuild-loader": "^2.19.0", + "escape-string-regexp": "^5.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "html-webpack-plugin": "^5.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8d2fd2..d9dfe87 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,6 +34,7 @@ specifiers: deepmerge: 4.2.2 esbuild: ^0.14.47 esbuild-loader: ^2.19.0 + escape-string-regexp: ^5.0.0 eslint: 7.32.0 eslint-config-lark: ^0.4.0 file-loader: ^6.2.0 @@ -101,6 +102,7 @@ dependencies: deepmerge: 4.2.2 esbuild: 0.14.47 esbuild-loader: 2.19.0_webpack@5.73.0 + escape-string-regexp: 5.0.0 file-loader: 6.2.0_webpack@5.73.0 fs-extra: 10.1.0 html-webpack-plugin: 5.5.0_webpack@5.73.0 @@ -5902,6 +5904,14 @@ packages: } engines: { node: '>=10' } + /escape-string-regexp/5.0.0: + resolution: + { + integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== + } + engines: { node: '>=12' } + dev: false + /eslint-config-airbnb-base/15.0.0_3bd94fa9be989baab6ef2e6b5dec3766: resolution: { diff --git a/src/webpack/webpack.config.js b/src/webpack/webpack.config.js index 2683b52..88bfbca 100644 --- a/src/webpack/webpack.config.js +++ b/src/webpack/webpack.config.js @@ -21,6 +21,7 @@ const variables = require('../variables/variables') const paths = require('../variables/paths') const builds = require('../variables/builds') +// eslint-disable-next-line const reactRefreshRuntimeEntry = require.resolve('react-refresh/runtime') const reactRefreshWebpackPluginRuntimeEntry = require.resolve( '@pmmmwh/react-refresh-webpack-plugin' @@ -28,7 +29,7 @@ const reactRefreshWebpackPluginRuntimeEntry = require.resolve( const { __DEV__, PUBLIC_PATH: publicPath, APP_ENV } = variables const { appIndex, appSrc, appHtml, appPolyfill } = paths -const { mfsu: MFSU_ENABLED, transpiler, transpilerOptions } = builds +const { transpiler, transpilerOptions } = builds const tsconfigRaw = [paths.appTsConfig, paths.appJsConfig].filter((f) => fs.existsSync(f)