-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add outputLessBundle option to output the intermediate bundle file #34
base: master
Are you sure you want to change the base?
Conversation
@cc-ebay what is the use case here? This particular change is not going to mesh well with the existing lasso tooling, for example, a plugin that uploads assets to a resource server would not work with this. |
@DylanPiercey Being able to serve the |
@cc-ebay I'm not following what the actual end goal is here though. Is this something you want for dev mode? What is special about the less generated Is it just about adding source maps? |
Yes, in dev mode you can see source maps to the bundle |
Since this module is setup to (when bundling is disabled) merge all the Does the following by itself not work for you? {plugin: 'lasso-less', config: {
lessConfig: {
env: "development",
dumpLineNumbers: true,
sourceMap: {
sourceMapFileInline: true
}
}
}} |
Now that I am looking at it, this plugin actually does the less module concatenation to make the "single less file" and also inlines comments and such that is not going to work without modification using that sourcemap option. Even with your change to provide an option to extract the less to a different file, it would still not have the correct sourcemaps. |
I lost the changes but after patching the plugin options here https://github.com/marko-js-archive/marko-starter-lasso/blob/master/createLassoConfig.js#L74 I was able to see the source maps related to the bundle files. It is not as good as mapping to the single source files but better than having only Does not Chrome still need to be able to load the |
I see, if that is all you are going for then it should work to just make the config: {
plugin: "lasso-less",
config: {
lessConfig: {
sourceMap: {
sourceMapFileInline: true,
outputSourceFiles: true
}
}
}
} |
With this option we can check the intermediate file. With the appropriate less options we can even use the source maps.
Ex: