Compare commits

..

4 Commits

Author SHA1 Message Date
Steve Faulkner
a6e4d1eaf9 Remove default 2020-09-25 18:13:11 -05:00
Steve Faulkner
2d3d96bcc7 xMerge branch 'master' into exclude-vendor-from-sourcemaps 2020-09-25 18:12:17 -05:00
Steve Faulkner
f2d4cfcef9 Fixes 2020-09-25 18:12:04 -05:00
Steve Faulkner
9ea588261e Don't generate source maps for vendor files 2020-09-25 14:46:51 -05:00
3 changed files with 19 additions and 7 deletions

View File

@@ -307,7 +307,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestQueryApi
: Constants.CassandraBackend.queryApi;
$.ajax(`${collection.container.extensionEndpoint()}/${apiEndpoint}`, {
$.ajax(`${collection.container.extensionEndpoint()}${apiEndpoint}`, {
type: "POST",
data: {
accountName: collection && collection.container.databaseAccount && collection.container.databaseAccount().name,
@@ -558,7 +558,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestKeysApi
: Constants.CassandraBackend.keysApi;
let endpoint = `${collection.container.extensionEndpoint()}/${apiEndpoint}`;
let endpoint = `${collection.container.extensionEndpoint()}${apiEndpoint}`;
const deferred = Q.defer<CassandraTableKeys>();
$.ajax(endpoint, {
type: "POST",
@@ -613,7 +613,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestSchemaApi
: Constants.CassandraBackend.schemaApi;
let endpoint = `${collection.container.extensionEndpoint()}/${apiEndpoint}`;
let endpoint = `${collection.container.extensionEndpoint()}${apiEndpoint}`;
const deferred = Q.defer<CassandraTableKey[]>();
$.ajax(endpoint, {
type: "POST",
@@ -667,7 +667,7 @@ export class CassandraAPIDataClient extends TableDataClient {
authType === AuthType.EncryptedToken
? Constants.CassandraBackend.guestCreateOrDeleteApi
: Constants.CassandraBackend.createOrDeleteApi;
$.ajax(`${explorer.extensionEndpoint()}/${apiEndpoint}`, {
$.ajax(`${explorer.extensionEndpoint()}${apiEndpoint}`, {
type: "POST",
data: {
accountName: explorer.databaseAccount() && explorer.databaseAccount().name,

View File

@@ -1,7 +1,7 @@
{
"compilerOptions": {
"allowJs": true,
"sourceMap": false,
"sourceMap": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,

View File

@@ -11,6 +11,7 @@ const childProcess = require("child_process");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const TerserPlugin = require("terser-webpack-plugin");
const isCI = require("is-ci");
const webpack = require("webpack");
const gitSha = childProcess.execSync("git rev-parse HEAD").toString("utf8");
@@ -104,6 +105,15 @@ module.exports = function(env = {}, argv = {}) {
envVars.NODE_ENV = "development";
}
const sourceMapPlugin =
mode === "development"
? new webpack.EvalSourceMapDevToolPlugin({})
: new webpack.SourceMapDevToolPlugin({
// test: [".js", ".mjs", ".css", ".ts", ".tsx"],
filename: "[name].js.map",
exclude: [/vendor/]
});
const plugins = [
new CleanWebpackPlugin(["dist"]),
new CreateFileWebpack({
@@ -164,7 +174,9 @@ module.exports = function(env = {}, argv = {}) {
new CopyWebpackPlugin({
patterns: [{ from: "DataExplorer.nuspec" }, { from: "web.config" }, { from: "quickstart/*.zip" }]
}),
new EnvironmentPlugin(envVars)
new EnvironmentPlugin(envVars),
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }),
sourceMapPlugin
];
if (argv.analyze) {
@@ -194,7 +206,6 @@ module.exports = function(env = {}, argv = {}) {
filename: "[name].[chunkhash:6].js",
path: path.resolve(__dirname, "dist")
},
devtool: mode === "development" ? "cheap-eval-source-map" : "source-map",
plugins,
module: {
rules
@@ -206,6 +217,7 @@ module.exports = function(env = {}, argv = {}) {
minimize: mode === "production" ? true : false,
minimizer: [
new TerserPlugin({
sourceMap: true,
cache: ".cache/terser",
terserOptions: {
// These options increase our initial bundle size by ~5% but the builds are significantly faster and won't run out of memory