Socket
Socket
Sign inDemoInstall

spfx-fast-serve

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spfx-fast-serve - npm Package Compare versions

Comparing version 1.10.4 to 1.10.5

6

CHANGELOG.md
# Change Log
## [1.10.5] - 24 Apr 2020
### Fixed
- Bundles loading issue [#4](https://github.com/s-KaiNet/spfx-fast-serve/issues/4)
## [1.10.4] - 29 Mar 2020

@@ -4,0 +10,0 @@

2

package.json
{
"name": "spfx-fast-serve",
"version": "1.10.4",
"version": "1.10.5",
"author": "Sergei Sergeev (https://github.com/s-KaiNet)",

@@ -5,0 +5,0 @@ "description": "Improve your SharePoint Framework development by speeding up 'serve' command",

@@ -0,0 +0,0 @@ #!/usr/bin/env node

const path = require("path");
const fs = require("fs");
const webpack = require("webpack");

@@ -71,3 +72,6 @@ const resolve = require("path").resolve;

options: {
transpileOnly: true
transpileOnly: true,
compilerOptions: {
declarationMap: false
}
},

@@ -198,17 +202,4 @@ exclude: /node_modules/

// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
const pathToSearch = path.sep + "lib" + path.sep;
const pathToReplace = path.sep + "src" + path.sep;
const originalEntries = Object.keys(originalWebpackConfig.entry);
baseConfig.entry = getEntryPoints(originalWebpackConfig.entry);
for (const key in originalWebpackConfig.entry) {
let entry = originalWebpackConfig.entry[key];
entry = entry.replace(pathToSearch, pathToReplace).slice(0, -3) + ".ts";
newEntry[key] = entry;
}
baseConfig.entry = newEntry;
baseConfig.output.publicPath = host + "/dist/";

@@ -218,2 +209,3 @@

const modulesMap = {};
const originalEntries = Object.keys(originalWebpackConfig.entry);

@@ -239,2 +231,31 @@ for (const jsModule of manifest) {

function getEntryPoints(entry) {
// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
let libSearchRegexp;
if (path.sep === "/") {
libSearchRegexp = /\/lib\//gi;
} else {
libSearchRegexp = /\\lib\\/gi;
}
const srcPathToReplace = path.sep + "src" + path.sep;
for (const key in entry) {
let entryPath = entry[key];
if (entryPath.indexOf("bundle-entries") === -1) {
entryPath = entryPath.replace(libSearchRegexp, srcPathToReplace).slice(0, -3) + ".ts";
} else {
// replace paths and extensions in bundle file
let bundleContent = fs.readFileSync(entryPath).toString();
bundleContent = bundleContent.replace(libSearchRegexp, srcPathToReplace).replace(/\.js/gi, ".ts");
fs.writeFileSync(entryPath, bundleContent);
}
newEntry[key] = entryPath;
}
return newEntry;
}
module.exports = createConfig();
const path = require("path");
const fs = require("fs");
const webpack = require("webpack");

@@ -71,3 +72,6 @@ const resolve = require("path").resolve;

options: {
transpileOnly: true
transpileOnly: true,
compilerOptions: {
declarationMap: false
}
},

@@ -198,17 +202,4 @@ exclude: /node_modules/

// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
const pathToSearch = path.sep + "lib" + path.sep;
const pathToReplace = path.sep + "src" + path.sep;
const originalEntries = Object.keys(originalWebpackConfig.entry);
baseConfig.entry = getEntryPoints(originalWebpackConfig.entry);
for (const key in originalWebpackConfig.entry) {
let entry = originalWebpackConfig.entry[key];
entry = entry.replace(pathToSearch, pathToReplace).slice(0, -3) + ".ts";
newEntry[key] = entry;
}
baseConfig.entry = newEntry;
baseConfig.output.publicPath = host + "/dist/";

@@ -218,2 +209,3 @@

const modulesMap = {};
const originalEntries = Object.keys(originalWebpackConfig.entry);

@@ -239,2 +231,31 @@ for (const jsModule of manifest) {

function getEntryPoints(entry) {
// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
let libSearchRegexp;
if (path.sep === "/") {
libSearchRegexp = /\/lib\//gi;
} else {
libSearchRegexp = /\\lib\\/gi;
}
const srcPathToReplace = path.sep + "src" + path.sep;
for (const key in entry) {
let entryPath = entry[key];
if (entryPath.indexOf("bundle-entries") === -1) {
entryPath = entryPath.replace(libSearchRegexp, srcPathToReplace).slice(0, -3) + ".ts";
} else {
// replace paths and extensions in bundle file
let bundleContent = fs.readFileSync(entryPath).toString();
bundleContent = bundleContent.replace(libSearchRegexp, srcPathToReplace).replace(/\.js/gi, ".ts");
fs.writeFileSync(entryPath, bundleContent);
}
newEntry[key] = entryPath;
}
return newEntry;
}
module.exports = createConfig();
const path = require("path");
const fs = require("fs");
const webpack = require("webpack");

@@ -200,17 +201,4 @@ const resolve = require("path").resolve;

// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
const pathToSearch = path.sep + "lib" + path.sep;
const pathToReplace = path.sep + "src" + path.sep;
const originalEntries = Object.keys(originalWebpackConfig.entry);
baseConfig.entry = getEntryPoints(originalWebpackConfig.entry);
for (const key in originalWebpackConfig.entry) {
let entry = originalWebpackConfig.entry[key];
entry = entry.replace(pathToSearch, pathToReplace).slice(0, -3) + ".ts";
newEntry[key] = entry;
}
baseConfig.entry = newEntry;
baseConfig.output.publicPath = host + "/dist/";

@@ -220,2 +208,3 @@

const modulesMap = {};
const originalEntries = Object.keys(originalWebpackConfig.entry);

@@ -241,2 +230,31 @@ for (const jsModule of manifest) {

function getEntryPoints(entry) {
// fix: ".js" entry needs to be ".ts"
// also replaces the path form /lib/* to /src/*
let newEntry = {};
let libSearchRegexp;
if (path.sep === "/") {
libSearchRegexp = /\/lib\//gi;
} else {
libSearchRegexp = /\\lib\\/gi;
}
const srcPathToReplace = path.sep + "src" + path.sep;
for (const key in entry) {
let entryPath = entry[key];
if (entryPath.indexOf("bundle-entries") === -1) {
entryPath = entryPath.replace(libSearchRegexp, srcPathToReplace).slice(0, -3) + ".ts";
} else {
// replace paths and extensions in bundle file
let bundleContent = fs.readFileSync(entryPath).toString();
bundleContent = bundleContent.replace(libSearchRegexp, srcPathToReplace).replace(/\.js/gi, ".ts");
fs.writeFileSync(entryPath, bundleContent);
}
newEntry[key] = entryPath;
}
return newEntry;
}
module.exports = createConfig();
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc