From f9afd3f8b9e6bf256d226a8096b0bc3a007ad1cb Mon Sep 17 00:00:00 2001 From: Loduis Madariaga Barrios Date: Tue, 17 Nov 2020 08:08:09 -0500 Subject: [PATCH 1/2] Fix interprete js file no loaders When you load bootstrap and jquery from local files, this files are interprete and jQuery variable is undefined report. --- src/extractLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extractLoader.js b/src/extractLoader.js index 947ed37..77f35af 100644 --- a/src/extractLoader.js +++ b/src/extractLoader.js @@ -135,7 +135,7 @@ function evalDependencyGraph({loaderContext, src, filename, publicPath = ""}) { // If the required file is a js file, we just require it with node's require. // If the required file should be processed by a loader we do not touch it (even if it is a .js file). - if (loaders === "" && ext === ".js") { + if (loaders === "" && ext === ".js" && givenRelativePath.includes('node_modules')) { // Mark the file as dependency so webpack's watcher is working for the css-loader helper. // Other dependencies are automatically added by loadModule() below loaderContext.addDependency(absolutePath); From 0bed432fec11ab23b3e8a5e11cfb8d73de52ac5e Mon Sep 17 00:00:00 2001 From: Loduis Madariaga Barrios Date: Sat, 28 Nov 2020 07:25:30 -0500 Subject: [PATCH 2/2] Update package.json Build on install packagge --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 55d7fd5..9b5886e 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "test": "cross-env NODE_ENV=test nyc mocha -R spec", "posttest": "eslint src test", "release": "standard-version", + "prepare": "npm run build", "prepublishOnly": "npm run build" }, "repository": {