Skip to content

Commit 49d3439

Browse files
authored
fix: measurementsAPI issue caused by production build (#842)
* ci: test docs-publish * Specify to use prod * Babel should transpile with env set by webpack * in-progress * in-progress * Polyfill for ie11 and edge features * Ditch polyfills w/ babel - we'll use a service for now * Bump tools version; shift vtk.js up a layer * Specify we shouldn't target older than IE 11 * ditch babel plugins that should be covered by preset-env * Add a top level build demo command * Let our babel config determine settings * Same babel fixes as PWA * Rebuild deps that don't satisfy our target * Mini helper script for excluding all node_modules, except... * Shift vtk.js dep up a layer * Kill core-js * Export in a node happy way * Updated yarn lock * Set NODE_ENV when launching anything w/ WebPack * docs: updated FAQ * docs: on browser support * Add support for redux browser extension * misc. small clean-up * docs: Remove roadmap page; add browser-support to sidebar * Formatting * Remove roadmap links * Formatting * ci: Remove config syntax error * Simplified bug report template * update community request template * Update question's template * simplify build scripts * specify new script names * fix: for measurement api being pruned by minimizer in prod builds * Use named exports * Simplify config * Let's not do so much heavy lifting for a dev-server build * fix dev build * Add hotkeys to demo * fix: jest babel config and env specific configs * Remove call to non-existant command * Shift experimental proposal plugin up a layer * Use `https` * Try with reduced number of package exceptions * Try to resolve cypress issue * Try to fix cypress issue in CI * Skip https
1 parent 25e7232 commit 49d3439

63 files changed

Lines changed: 1776 additions & 816 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.browserslistrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Browsers that we support
2+
3+
> 1%
4+
IE 11
5+
not dead
6+
not op_mini all

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ workflows:
279279
# Cypress job added by `cypress-io` orb
280280
- cypress/run:
281281
pre-steps:
282-
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest
282+
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
283+
add wait-on' # Use yarn latest
283284
yarn: true
284285
store_artifacts: true
285286
start: yarn run dev
@@ -303,7 +304,8 @@ workflows:
303304
# Cypress job added by `cypress-io` orb
304305
- cypress/run:
305306
pre-steps:
306-
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest
307+
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
308+
add wait-on' # Use yarn latest
307309
yarn: true
308310
record: true
309311
store_artifacts: true

.github/ISSUE_TEMPLATE/---bug-report.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,32 @@
22
name: "\U0001F41B Bug report"
33
about: Create a report to help us improve
44
title: ''
5-
labels: 'Bug Report :bug:'
5+
labels: 'Community: Report :bug:'
66
assignees: ''
77
---
88

9-
**Before Creating an issue**
9+
> **Before Creating an issue**
10+
>
11+
> - Are you running the latest version?
12+
> - Are you reporting to the correct repository?
13+
> - Did you search existing issues?
1014
11-
- Are you running the latest version?
12-
- Are you reporting to the correct repository?
13-
- Did you search existing issues?
15+
## Bug Report
1416

15-
**Describe the bug**
17+
### Describe the Bug
1618

1719
_A clear and concise description of what the bug is._
1820

19-
**Steps To Reproduce**
21+
### What steps can we follow to reproduce the bug?
2022

21-
1. [First Step]
22-
2. [Second Step]
23+
1. First step
24+
2. Second step
2325
3. ...
2426

25-
```
27+
```js
2628
Please use code blocks to show formatted errors or code snippets
2729
```
2830

29-
**Expected behavior**
30-
31-
_A clear and concise description of what you expected to happen._
32-
33-
**Environment**
34-
35-
- OS: [e.g. iOS]
36-
- Browser [e.g. chrome, safari]
37-
- Version [e.g. 22]
38-
39-
**Additional context**
31+
> :warning: Reports we cannot reproduce are at risk of being marked stale and
32+
> closed. The more information you can provide, the more likely we are to look
33+
> into and address your issue.

.github/ISSUE_TEMPLATE/---feature-request.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@
22
name: "\U0001F680 Feature request"
33
about: Suggest an idea for this project
44
title: ''
5-
labels: enhancement
5+
labels: 'Community: Request :hand:'
66
assignees: ''
77
---
88

9-
<!-- ## Awesome, do you have an idea? 😍
9+
> :hand: Many people requests features. Tell us why yours is important to the
10+
> community. How does it add value? Why _this feature_?
11+
>
12+
> Is your request very specific to your needs? Consider
13+
> [contributing it](https://docs.ohif.org/contributing.html) yourself! Or reach
14+
> out to a community member that offers
15+
> [consulting services](https://docs.ohif.org/help.html#paid--commercial).
1016
11-
If you have a **feature request, improvement or idea**, check [our official roadmap](https://github.com/OHIF/react-viewerbase/projects) to see if it is already planned! -->
17+
## Request
1218

13-
<!-- ### 👉 &nbsp; [Go to Roadmap](https://github.com/OHIF/react-viewerbase/projects)
19+
**What feature or change would you like to see made?**
1420

15-
If your feature request isn't there, continue with this issue and we can discuss
16-
it 🤟 -->
21+
...
1722

18-
Please include the reasons why you think your change should be made, and any
19-
supporting evidence that helps us asses its value and priority.
23+
**Why should we prioritize this feature?**
24+
25+
...

.github/ISSUE_TEMPLATE/---support-question.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name: "\U0001F917 Support Question"
33
about: "I have a question \U0001F4AC"
44
title: ''
5-
labels: question
5+
labels: 'Community: Question :question:'
66
assignees: ''
77
---
88

9-
We are a small team with limited resources. Your question is much more likely to
10-
be answered if it is
11-
[a good question](https://stackoverflow.com/help/how-to-ask)
9+
> :hand: We are a small team with limited resources. Your question is much more
10+
> likely to be answered if it is
11+
> [a good question](https://stackoverflow.com/help/how-to-ask)
1212
1313
**Description**
1414

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const path = require('path');
2+
3+
function excludeNodeModulesExcept(modules) {
4+
var pathSep = path.sep;
5+
if (pathSep == '\\')
6+
// must be quoted for use in a regexp:
7+
pathSep = '\\\\';
8+
var moduleRegExps = modules.map(function(modName) {
9+
return new RegExp('node_modules' + pathSep + modName);
10+
});
11+
12+
return function(modulePath) {
13+
if (/node_modules/.test(modulePath)) {
14+
for (var i = 0; i < moduleRegExps.length; i++)
15+
if (moduleRegExps[i].test(modulePath)) return false;
16+
return true;
17+
}
18+
return false;
19+
};
20+
}
21+
22+
module.exports = excludeNodeModulesExcept;

.webpack/rules/cssToJavaScript.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const autoprefixer = require('autoprefixer');
2+
3+
const cssToJavaScript = {
4+
test: /\.css$/,
5+
use: [
6+
'style-loader',
7+
{ loader: 'css-loader', options: { importLoaders: 1 } },
8+
{
9+
loader: 'postcss-loader',
10+
options: {
11+
plugins: () => [autoprefixer('last 2 version', 'ie >= 11')],
12+
},
13+
},
14+
],
15+
};
16+
17+
module.exports = cssToJavaScript;

.webpack/rules/loadShaders.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* This is exclusively used by `vtk.js` to bundle glsl files.
3+
*/
4+
const loadShaders = {
5+
test: /\.glsl$/i,
6+
include: /vtk\.js[\/\\]Sources/,
7+
loader: 'shader-loader',
8+
};
9+
10+
module.exports = loadShaders;

.webpack/rules/loadWebWorkers.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* This allows us to include web workers in our bundle, and VTK.js
3+
* web workers in our bundle. While this increases bundle size, it
4+
* cuts down on the number of includes we need for `script tag` usage.
5+
*/
6+
const loadWebWorkers = {
7+
test: /\.worker\.js$/,
8+
include: /vtk\.js[\/\\]Sources/,
9+
use: [
10+
{
11+
loader: 'worker-loader',
12+
options: { inline: true, fallback: false },
13+
},
14+
],
15+
};
16+
17+
module.exports = loadWebWorkers;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const stylusToJavaScript = {
2+
test: /\.styl$/,
3+
use: [
4+
{ loader: 'style-loader' }, // 3. Style nodes from JS Strings
5+
{ loader: 'css-loader' }, // 2. CSS to CommonJS
6+
{ loader: 'stylus-loader' }, // 1. Stylus to CSS
7+
],
8+
};
9+
10+
module.exports = stylusToJavaScript;

0 commit comments

Comments
 (0)