From e26edd17a053005aee3085cb0eb7970d535be10f Mon Sep 17 00:00:00 2001 From: Llewellyn Date: Thu, 29 Jul 2021 10:49:02 -0700 Subject: [PATCH] added file loaders to webpack and removed jquery --- edsc_extension/src/index.ts | 5 ++--- ipycmc/webpack.config.js | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/edsc_extension/src/index.ts b/edsc_extension/src/index.ts index 3323bb1a..9a8460ed 100644 --- a/edsc_extension/src/index.ts +++ b/edsc_extension/src/index.ts @@ -16,7 +16,6 @@ import { ReadonlyJSONObject } from '@lumino/coreutils'; /** other external imports **/ import { INotification } from "jupyterlab_toastify"; -import * as $ from "jquery"; /** internal imports **/ import '../style/index.css'; @@ -128,7 +127,7 @@ function activate(app: JupyterFrontEnd, xhr.onload = function() { if (xhr.status == 200) { - let response: any = $.parseJSON(xhr.response); + let response: any = JSON.parse(xhr.response); response_text = response.query_string; if (response_text == "") { response_text = "No results found."; @@ -168,7 +167,7 @@ function activate(app: JupyterFrontEnd, xhr.onload = function() { if (xhr.status == 200) { - let response: any = $.parseJSON(xhr.response); + let response: any = JSON.parse(xhr.response); let response_text: any = response.granule_urls; if (response_text == "") { response_text = "No results found."; diff --git a/ipycmc/webpack.config.js b/ipycmc/webpack.config.js index ccc54de8..d393aca4 100644 --- a/ipycmc/webpack.config.js +++ b/ipycmc/webpack.config.js @@ -8,7 +8,11 @@ cmc_assets = /maap-common-mapping-client\/dist/; const rules = [ { test: /\.ts$/, loader: "ts-loader" }, { test: /\.js$/, loader: "source-map-loader" }, - { test: /\.css$/, use: ["style-loader", "css-loader"] } + { test: /\.css$/, use: ["style-loader", "css-loader"] }, + { test: /\.ttf$/, use: ["file-loader"] }, + { test: /\.woff$/, use: ["file-loader"] }, + { test: /\.eot$/, use: ["file-loader"] }, + { test: /\.svg$/, use: ["file-loader"] } ]; // Packages that shouldn't be bundled but loaded at runtime