source map always points to bundle for big files
tadatuta opened this issue · 1 comments
tadatuta commented
Steps to reproduce:
- Clone project-stub
npm i
- Add
sourcemap: true
option to stylus options in.enb/make.js
- 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.
blond commented
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.