diff --git a/package.json b/package.json index bb97907e1..cf2ae8719 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "happypack": "^5.0.1", "html-webpack-plugin": "^3.2.0", "http-browserify": "^1.7.0", + "ignore-loader": "^0.1.2", "mini-css-extract-plugin": "^0.5.0", "node-sass": "^4.11.0", "npm-run-all": "^4.1.5", diff --git a/scripts/webpack.general.config.js b/scripts/webpack.general.config.js index 49231dbcc..e29226d52 100644 --- a/scripts/webpack.general.config.js +++ b/scripts/webpack.general.config.js @@ -17,7 +17,12 @@ module.exports = (options = {}) => ({ test: /\.(js)/, exclude: /test/, }, { - test: /\.(txt|d\.ts|test.ts|perf.data.js|jxs)/, + test: /\.(txt|d\.ts|test.ts|perf.data.js|jxs|md|scpt|exe|sh|less)$/, + use: [{ + loader: "ignore-loader", + }], + }, { + test: /electron-browser.+\.html$/, use: [{ loader: "ignore-loader", }], @@ -50,7 +55,7 @@ module.exports = (options = {}) => ({ test: /\.wasm$/, type: "javascript/auto", }], - noParse: /\.test\.(j|t)sx?/, + noParse: /\/test\/|\.test\.jsx?|\.test\.tsx?|tsconfig.+\.json$/, }, resolve: { alias: { diff --git a/yarn.lock b/yarn.lock index 47b9b0bb6..c0e0313b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2333,6 +2333,11 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= +ignore-loader@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ignore-loader/-/ignore-loader-0.1.2.tgz#d81f240376d0ba4f0d778972c3ad25874117a463" + integrity sha1-2B8kA3bQuk8Nd4lyw60lh0EXpGM= + ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"