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

source map always points to bundle for big files #112

Open
tadatuta opened this issue Oct 19, 2015 · 1 comment
Open

source map always points to bundle for big files #112

tadatuta opened this issue Oct 19, 2015 · 1 comment

Comments

@tadatuta
Copy link
Member

Steps to reproduce:

  1. Clone project-stub
  2. npm i
  3. Add sourcemap: true option to stylus options in .enb/make.js
  4. Inspect elements => all selectors point to index.css instead of proper *.styl files

But when bundle is cut to, for example, just

module.exports = {
    block : 'page',
    title : 'Title of the page',
    favicon : '/favicon.ico',
    head : [
        { elem : 'meta', attrs : { name : 'description', content : '' } },
        { elem : 'meta', attrs : { name : 'viewport', content : 'width=device-width, initial-scale=1' } },
        { elem : 'css', url : 'index.css' }
    ],
    scripts: [{ elem : 'js', url : 'index.min.js' }],
    mods : { theme : 'islands' },
    content : [
        {
            block : 'header',
            content : [
                'header content goes here'
            ]
        },
        {
            block : 'content',
            content : [
                {
                    block : 'line',
                    mods : { size : 's' },
                    content : [
                        'size s (24px height) ',
                        {
                            block : 'input',
                            mods : { theme : 'islands', size : 's', 'has-clear' : true },
                            val : 'value',
                            placeholder : 'placeholder'
                        },
                        ' ',
                        {
                            block : 'button',
                            mods : { theme : 'islands', size : 's' },
                            text : 'button'
                        },
                        ' ',
                        {
                            block : 'button',
                            mods : { theme : 'islands', size : 's' },
                            text : 'button',
                            icon : { block : 'icon', mods : { action : 'download' } }
                        },
                        ' ',
                        {
                            block : 'button',
                            mods : { theme : 'islands', size : 's' },
                            icon : { block : 'spin', mods : { theme : 'islands', size : 'xs', visible : true } },
                            text : 'Loading...'
                        },
                        ' ',
                        {
                            block : 'radio-group',
                            mods : { theme : 'islands', size : 's', type : 'button' },
                            name : 'radio-sizes-s',
                            options : [
                                { val : 1, text : 'first' },
                                { val : 2, text : 'second', checked : true }
                            ]
                        },
                        ' ',
                        {
                            block : 'checkbox',
                            mods : { theme : 'islands', size : 's', type : 'button' },
                            val : 1,
                            text : 'check'
                        },
                        ' ',
                        {
                            block : 'dropdown',
                            mods : { switcher : 'button', theme : 'islands', size : 's' },
                            switcher : 'dropdown',
                            popup : { block : 'popup', mods : { theme : 'islands' }, content : 'popup' }
                        },
                        ' ',
                        {
                            block : 'select',
                            mods : { mode : 'radio-check', theme : 'islands', size : 's' },
                            name : 'select',
                            text : 'first',
                            options : [
                                { val : 1, text : 'first', checked: true },
                                { val : 2, text : 'second' }
                            ]
                        },
                        ' ',
                        {
                            block : 'spin',
                            mods : { theme : 'islands', size : 's', visible : true }
                        }
                    ]
                }
            ]
        },
        {
            block : 'footer',
            content : [
                'footer content goes here'
            ]
        }
    ]
};

source map works fine.

@tadatuta tadatuta added the bug label Oct 19, 2015
@levonet levonet added the ready label Oct 23, 2015
@blond
Copy link
Member

blond commented Nov 10, 2015

Source map works well with big files.

This bug is reproduced with block icon only:

module.exports = {
    block : 'page',
    title : 'Title of the page',
    favicon : '/favicon.ico',
    head : [
        { elem : 'meta', attrs : { name : 'description', content : '' } },
        { elem : 'meta', attrs : { name : 'viewport', content : 'width=device-width, initial-scale=1' } },
        { elem : 'css', url : 'index.min.css' }
    ],
    scripts: [{ elem : 'js', url : 'index.min.js' }],
    mods : { theme : 'islands' },
    content : [
        { block : 'icon' }
    ]
};

If you remove this comment from source code then it will fix source maps.

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

No branches or pull requests

3 participants