Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix weird bundling issue with systemjs #102

Closed
wants to merge 1 commit into from

Conversation

rdeits
Copy link
Collaborator

@rdeits rdeits commented May 3, 2018

Fixes #101

The important change here seems to be restricting systemjs to 0.20 instead of 0.21. Otherwise running the bundlejs() step produces the following warning:

WARNING in ./node_modules/systemjs/dist/system.js
    4:36270-36272 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
     @ ./node_modules/systemjs/dist/system.js
     @ ./node.js
     @ ./index.js

and we get the errors in #101.

I'd love to find a better solution that doesn't require downgrading systemjs, but I'm not sure what that would be.

@codecov-io
Copy link

Codecov Report

Merging #102 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #102   +/-   ##
======================================
  Coverage    60.8%   60.8%           
======================================
  Files          14      14           
  Lines         398     398           
======================================
  Hits          242     242           
  Misses        156     156

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 204f580...3a24918. Read the comment docs.

@shashi
Copy link
Member

shashi commented May 4, 2018

It's really annoying that newer versions of systemjs breaks things that used to work.

So having fixed the versions, can we be sure that everyone compiling the JS will generate small diffs?

@shashi
Copy link
Member

shashi commented May 4, 2018

It seems

     @ ./node.js
     @ ./index.js

Probably hints that our code is doing something illegal.

@rdeits
Copy link
Collaborator Author

rdeits commented May 4, 2018

I think that the best way to ensure future compatibility would be to check in the package-lock.json file, which will ensure exactly the same versions of everything going forward. I'm not entirely sure how that will work with the two separate node package installs (in deps and assets). What's the reason for having two entirely separate node_modules directories? They both contain copies of webpack and all its dependencies, so there's a lot of duplication there.

@shashi
Copy link
Member

shashi commented May 4, 2018

Having 2 different package.json was the easiest way to build in both assets and deps. I am open to unifying them. Any JS stuff can probably completely moved to assets without making the name nonsensical.

@rdeits
Copy link
Collaborator Author

rdeits commented May 4, 2018

Closing in favor of #103

@rdeits rdeits closed this May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants