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

Sourcemaps Are Not Valid OTB #7237

Closed
chadhietala opened this issue Jul 18, 2017 · 6 comments
Closed

Sourcemaps Are Not Valid OTB #7237

chadhietala opened this issue Jul 18, 2017 · 6 comments

Comments

@chadhietala
Copy link
Member

Steps To Reproduce

  1. ember new my-app --yarn=true
  2. ember build --environment=production
  3. yarn add sourcemap-validator --dev
  4. require("sourcemap-validator")(fs.readFileSync('./dist/assets/app-SOMEHASH.js', './dist/assets/app-SOMEHASH.map'))
  5. Get the following error.
Error: Warning: mismatched names
Expected: exports || 'exports' || 'exports' || "exports" || "exports"
Got: define( || define('s || define('s || define('s || define('s
Original Line: define('sm-test/app', ['exports', 'ember', 'sm-test/resolver', 'ember-load-initializers', 'sm-test/config/environment'], function (exports, _ember, _resolver, _emberLoadInitializers, _environment) {
Mapping: 2:124→1:0 "exports" in sm-test/app.js

I have also noticed that out of the box all the col numbers are 0.


Ember Versions

ember-cli: 2.14.0
http_parser: 2.7.0
node: 7.9.0
v8: 5.5.372.43
uv: 1.11.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 51
openssl: 1.0.2k
icu: 58.2
unicode: 9.0
cldr: 30.0.3
tz: 2016j
os: darwin x64

Yarn Version

0.27.5
@stefanpenner
Copy link
Contributor

I wonder if they went bad post babel

@stefanpenner
Copy link
Contributor

i suspect it's something else. Maybe keep removing stuff until it works again

@stefanpenner
Copy link
Contributor

Another idea is to run the validation within broccoli concat and see which inputs are breaking (or if broccoli concat itself is breaking them)

@stefanpenner
Copy link
Contributor

Also the above looks like a great test to add to ember-cli's test suite.

@Turbo87
Copy link
Member

Turbo87 commented Jul 23, 2017

@stefanpenner I don't think that it belongs in the test suite of Ember CLI since this is likely an issue in either the Babel or UglifyJS addon

@Turbo87
Copy link
Member

Turbo87 commented Jul 27, 2017

it seems that @chadhietala has figured out that Babel sourcemaps are broken: babel/babel#6008

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

No branches or pull requests

3 participants