dicom-microscopy-viewer 0.48.2 → 0.48.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,16 @@ const merge = require('./merge')
3
3
  const rootPath = process.cwd()
4
4
  const baseConfig = require('./webpack-base')
5
5
  const TerserPlugin = require('terser-webpack-plugin')
6
- const outputPath = path.join(rootPath, 'dist', 'dynamic-import', 'dicom-microscopy-viewer')
6
+ const outputPath = path.join(rootPath, 'dist', 'dynamic-import')
7
+
8
+ /** Override the WASM rule from base config to use a specific public path to avoid conflicts */
9
+ const wasmRule = {
10
+ test: /\.wasm/,
11
+ type: 'asset/resource',
12
+ generator: {
13
+ filename: 'dicom-microscopy-viewer/[name][ext]'
14
+ }
15
+ }
7
16
 
8
17
  const prodConfig = {
9
18
  mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
@@ -15,7 +24,9 @@ const prodConfig = {
15
24
  libraryTarget: 'umd',
16
25
  globalObject: 'window',
17
26
  filename: '[name].min.js',
18
- publicPath: '/dicom-microscopy-viewer/'
27
+ },
28
+ module: {
29
+ rules: [wasmRule]
19
30
  },
20
31
  optimization: {
21
32
  minimize: process.env.NODE_ENV === 'production',
@@ -212717,7 +212717,25 @@ function getStatistics() {
212717
212717
  /******/
212718
212718
  /******/ /* webpack/runtime/publicPath */
212719
212719
  /******/ (() => {
212720
- /******/ __webpack_require__.p = "/dicom-microscopy-viewer/";
212720
+ /******/ var scriptUrl;
212721
+ /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
212722
+ /******/ var document = __webpack_require__.g.document;
212723
+ /******/ if (!scriptUrl && document) {
212724
+ /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
212725
+ /******/ scriptUrl = document.currentScript.src;
212726
+ /******/ if (!scriptUrl) {
212727
+ /******/ var scripts = document.getElementsByTagName("script");
212728
+ /******/ if(scripts.length) {
212729
+ /******/ var i = scripts.length - 1;
212730
+ /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
212731
+ /******/ }
212732
+ /******/ }
212733
+ /******/ }
212734
+ /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
212735
+ /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
212736
+ /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
212737
+ /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
212738
+ /******/ __webpack_require__.p = scriptUrl;
212721
212739
  /******/ })();
212722
212740
  /******/
212723
212741
  /************************************************************************/