question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source Maps not generating in dev

See original GitHub issue
  • Laravel Mix Version: #.#.# (npm list --depth=0) : version “1.0.6”
  • Node Version (node -v): 8.0.0
  • NPM Version (npm -v): 4.2.0
  • OS: osx 10.12.6

Description:

Source maps not getting generated

Steps To Reproduce:


const mix = require('laravel-mix')

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix
    .js('resources/assets/js/app.js', 'public/js')
    .js('resources/assets/js/public.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css')
    .sass('resources/assets/sass/public.scss', 'public/css')
    .extract([
        'vue',
        'vuex',
        'brace',
        'axios',
        'jquery',
        'lodash',
        'hint.css',
        'nprogress',
        'pusher-js',
        'clipboard',
        'vue-router',
        'vuedraggable',
        'laravel-echo',
        'moment-timezone',
        'filesize-parser',
        'lodash-inflection',
        'moment-precise-range-plugin'
    ])
    .autoload({
        vue: 'Vue',
        lodash: '_',
        ace: 'brace',
        'pusher-js': 'Pusher',
        clipboard: 'Clipboard',
        jquery: ['$', 'jQuery']
    })
    .sourceMaps()
    .version()

if (!mix.inProduction()) {
    mix.browserSync({
        open: 'external',
        host: 'codepier.dev',
        proxy: 'codepier.dev',
        files: [
            'resources/views/**/*.php',
            'public/js/**/*.js',
            'public/css/**/*.css'
        ]
    })
}

output :

npm run dev

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

8reactions
kulek1commented, Jun 27, 2017

Try this: https://github.com/JeffreyWay/laravel-mix/issues/879#issuecomment-310749504

Use one of them: inline-source-map or source-map

3reactions
rgr4ycommented, Jul 17, 2017

Can confirm this issue. When using devtool: ‘source-map’, JS source maps are generated. .map files for CSS are generated but are blank.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack not generating source maps
I run both npm build and npm run dev but neither seem to generate source maps. The way I'm checking if they show...
Read more >
sourcemaps not being generated · Issue #5384 · nrwl/nx
I am using @nrwl/next and for some reason I cannot find a way to generate source maps. Running nx serve my-app --sourceMap does...
Read more >
4 Reasons Why Your Source Maps are Broken
In a sense, source maps are the decoder ring to your secret (minified) code. However, they can be tricky to get working properly....
Read more >
Source Maps
Whether or not you want to enable source maps for production, they are handy for staging. Skipping source maps speeds up your build...
Read more >
The source maps don't work in Developer Tools when ...
DevTools downloads source maps using the front-end browser, not the one that runs the inspected page. So file://android... is never going to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found