Giter Site home page Giter Site logo

Comments (3)

butaminas avatar butaminas commented on June 3, 2024 1

I figured it out.
I was using laravel-mix for webpack and for some reason it was adding additional slash to the path.
Also, there was a problem with my versioning, the submitted version through the API had quotes and the front-end didn't.

For future reference, I fixed the double slash problem by adding this to my webpack / laravel-mix config:
mix.override(config => {
config.entry = Object.keys(config.entry).reduce((acc, key) => {
acc[key.replace(/^\//, "")] = config.entry[key]
return acc
}, {})
})

from rollbar-sourcemap-webpack-plugin.

brandondoran avatar brandondoran commented on June 3, 2024

Ok @butaminas, thanks for the update.

from rollbar-sourcemap-webpack-plugin.

philbates35 avatar philbates35 commented on June 3, 2024

For anyone else that comes across this double slash issue when using laravel-mix with this plugin, rather than fixing the issue by using mix.override() like in #197 (comment) to change the entry name, I found it cleaner to use the function form of the publicPath property to strip the leading slash at the point the soucemap file name is determined:

new RollbarSourceMapPlugin({
    publicPath: sourceFile => 'https://dynamichost/' + sourceFile.replace(/^\//, ''),
})

Ideally it would be nice if this plugin worked with chunks that start with a leading slash too, but I don't know enough about this project to submit an MR.

from rollbar-sourcemap-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.