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

No source maps #106

Closed
davidknezic opened this issue Mar 9, 2016 · 6 comments
Closed

No source maps #106

davidknezic opened this issue Mar 9, 2016 · 6 comments
Labels

Comments

@davidknezic
Copy link

Seems that the plugin doesn't support source maps.

Running it like this doesn't include any source maps into my build:

watchify index.js -d -t babelify -g envify -p livereactload -o bundle.js

However, compiling my bundle without the plugin gets me all the source maps inlined:

watchify index.js -d -t babelify -g envify -o bundle.js

Is there a way to add that feature?

@milankinen
Copy link
Owner

Hmm.. Have you tried to use inlined source maps? I've got them working in my projects.

@milankinen
Copy link
Owner

Closing this one since there is not activity lately.

@iamjochem
Copy link

hi @milankinen - this is still an issue, please reopen.

I'm currently using watchify v3.7.0 & livereactload 2.2.4 - when running watchify without -p livereactload inlined sourcemaps are included in the generated bundle, with -p livereactload the sourcemap is missing from the bundle.

In my case I am using babelify transform but specifying it via the browserify property in package.json, e.g.:

  "browserify": {
    "transform": [
      "babelify",
      "brfs"
    ]
  },

P.S. I have tried with livereactload 2.2.1 through 2.2.3 - just in case it was a regression in the last couple of versions ... they all exhibit the same behaviour of stripping the sourcemap from the browserified bundle.

@milankinen milankinen reopened this Jul 19, 2016
@milankinen
Copy link
Owner

Thanks! Re-opened the issue. Could you test the new (beta) version livereactload@2.3.0-rc7 and tell whether the source maps works in your case or not?

@iamjochem
Copy link

iamjochem commented Jul 19, 2016

hi there, just gave it a shot ... still no source map in the output, I'm piping through exorcist so I basically get the following warning:

The code that you piped into exorcist contains no source map!
Therefore it was piped through as is and no external map file generated.

my full command line looks like so:

./node_modules/.bin/watchify \
    -v --debug --delay=100 --fast --dg=0 \
    -t babelify -p livereactload \
    /my/project/client-entry-point.js \
  -o './node_modules/.bin/exorcist /my/project/dist/bundle.js.map > /my/project/dist/bundle.js'
  • I have tried removing all watchify cmdline parameters/flags (e.g. -v --debug --delay=100 --fast --dg=0 to see if that might have an affect but to no avail
  • all file-path-names have been changed to protect the innocent ;-)

I have a .babelrc file with the following in it (note that the sourceMaps property is only in there because I'm tried to get this to work... I don't think I actually need it):

{
    "presets"               : [
        "es2015",
        "react"
    ],
    "compact"               : true,
    "minified"              : false,
    "comments"              : true,
    "sourceMaps"            : true,

    "env"                   : {
        "development"       : {
            "plugins"       : [
                [ "react-transform", { "transforms": [ { "transform": "livereactload/babel-transform", "imports": ["react"] } ] } ]
            ]
        }
    }
}

@milankinen
Copy link
Owner

Should be fixed now in 3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants