Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Austin Kelleher
@austinkelleher
Hey @JarvisPrestidge I was able to reproduce this issue and put up a PR here: lasso-js/lasso-require#47
We should have that merged and published sometime today. I will also get this updated in Lasso 3.
Austin Kelleher
@austinkelleher
Hey @JarvisPrestidge. I've fixed this issue for both Lasso 2 and Lasso 3. If you re-install lasso-cli you should not see this issue anymore.
Jarvis Prestidge
@JarvisPrestidge
@austinkelleher good to hear and thank you very much :smile: i've also got some interesting behaviour on the marko gitter if you're free to take a look
Jarvis Prestidge
@JarvisPrestidge
Hi guys, is there a lasso plugin / configuration that allows bundling of node require type modules?
Since i've run into a blocker when trying to tie marko & lasso together with electron. I'm getting the following error - "Module not found: fs"
Jarvis Prestidge
@JarvisPrestidge
@austinkelleher :wave:
William Bewzenko
@WilliamBewzenko

Hi Guys!
I am using marko and lasso, I intend to be uploading the resources to s3, I would like to be uploading in runtime, but I am having some initial challenges, first which architecture to choose:

There is a possibility to do as suggested in the gist. What do you guys think about this still works?

Or use the lasso-s3-writer plugin, I would not like to be using it since it is necessary to run in prebuild.

Any personal suggestions? Reading? Implementation documentation?

Eldar
@Eldar-X
@austinkelleher Hi with lasso v3 i have extra file long-long-path-name-to-index.marko.init when render marko template. For example https://github.com/charlieduong94/marko-path-router-demo update lasso to v3 and enable bundling in server.js
Maybe i do something wrong ?
Yoni Medoff
@yomed
@Eldar-X Looks like that might be related to this issue lasso-js/lasso-marko#15
Eldar
@Eldar-X
@yomed yes and it's not good to show our path to app. We need fix for this
Yoni Medoff
@yomed
@Eldar-X You should be able to keep lasso-marko on a version below 2.4.0 for now, but I agree, it seems like a security issue
Renato Marinho
@renatomarinho
This message was deleted
Renato Peterman
@renatopeterman
Hi guys! We're trying to improve our browser-refresh/hot-reload refresh time. We realized that the lasso.handleWatchedFileChanged(path); just invalidates all the caches, so we need to re-run our entire lasso.lassoPage (which in our case is very slow) everytime a js or marko file changes. Is there any way to invalidate only one specific component (the one that changed) and rebuild only that component instead of running the lasso.lassoPage for the whole application? (we have a single page app)
Janakiram Ganesan
@janakg
Hi Everyone, Is there an option in lasso-cli for resolver { builtins: {}} ? Thanks in advance.
Renato Marinho
@renatomarinho
This message was deleted
Ian Von Holt
@ianvonholt
@mlrawlings @austinkelleher @DylanPiercey Hey guys, I see that there have been a lot of updates to LassoJS over the past couple months. Would we be able to get an update to the CHANGELOG to give developers some insight into some of the new features?
Pankaj Singh Bisht
@impsbisht_twitter
Hi, I am getting this error in my terminal The module [lasso] is using deprecated features. I am 6.10.0
Charles Read
@charlesread
Hi all, I’m containerizing Marko+Lasso apps, problem is that my asset bundles aren’t produced until the first request, so load balancing the containers with something like a k8s service is a problem as all of the asset bundles won’t be generated on a container whose actual endpoints havn’t been hit yet but may be the target of a load balancer request for such an asset, can I precompile all assets bundles? I am using the Marko/lasso taglib and have disabled fingerprinting, so that’s cool, now I jut need to generate those assets at deployment and I’ll be solid.
Alex Marion
@alexmarion
Hey all, I'm pretty new to lasso so I'm not sure if this is possible but if I have an app structured as follows:
/a
/b
/c/routes
/c/components
And I want to only lasso/minify/babel the /c directory to /c/static is there a way to exclude routes in /a and /b? The behavior that I've seen is that the routes in both a and b end up generating files in the /c/static directory
Ian Von Holt
@ianvonholt
@charlesread Unfortunately, this has been a problem with Lasso for quite some time: lasso-js/lasso#212
There was some work done on pre-build features, but there isn’t any documentation nor is there any evidence that it actually stops Lasso’s caching issue between build and serving a file.
Brian Sea
@bsea_twitter
I'm using lasso to package multiple JS files using require and I'm getting ReferenceErrors about module not being defined. Is this a known issue?
Oh.. I'm trying to load the bundled JS file from a Web Worker
Pankaj Singh Bisht
@impsbisht_twitter
Hi I am getting this error when i migrated from marko 3 to 4.

/Users/pankaj.bisht/repos/travacation/node_modules/lasso/dist-compat/plugins/lasso-minify-js/index.js:54
throw e;
^

TypeError: Cannot read property 'length' of undefined
at Object.transform (/Users/pankaj.bisht/repos/travacation/node_modules/lasso/dist-compat/plugins/lasso-minify-js/index.js:44:29)
at applyTransform (/Users/pankaj.bisht/repos/travacation/node_modules/lasso/dist-compat/transforms.js:70:30)
at Stream.end (/Users/pankaj.bisht/repos/travacation/node_modules/lasso/dist-compat/transforms.js:34:31)
at _end (/Users/pankaj.bisht/repos/travacation/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/pankaj.bisht/repos/travacation/node_modules/through/index.js:74:5)
at PassThrough.onend (_stream_readable.js:511:10)
at PassThrough.g (events.js:291:16)
at emitNone (events.js:91:20)
at PassThrough.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

I am using version marko version 4.16 and lasso ^3.2.1, lasso-marko ^2.3.0 and lasso/marko-taglib ^1.0.10
Pankaj Singh Bisht
@impsbisht_twitter
I am currently using lasso version 2.11.10 and Is bundling option is available in this? Also I tried to update it to lastest version of lasso 3.3.0. But my static files stopped building. Is lasso version 3.3.0 is compatible with "marko": "^3.14.3", "marko-widgets": "6.6.0".
Rafael Sanches
@mufumbo
@DylanPiercey do you know if there's any demo using lasso + marko that shows how to setup the dev environment in a way that lasso doesn't recompile every time the server boots for the first time? It's frustrating to wait 15 seconds. Seems like lasso doesn't do input source-code diffing?
Dylan Piercey
@DylanPiercey
@mufumbo we are really sparse on docs in this regard, but there is a prebuild feature of lasso and a Marko utility to create the prebuild files: https://github.com/marko-js/cli/blob/master/packages/prebuild/README.md. This isn’t really useful for dev because if a prebuild exists lasso will basically skip the build.
Rafael Sanches
@mufumbo
yeah!! @DylanPiercey we're SUPER excited, we slashed our first-boot of the lassoPage to 10s, from 15s, just by adding two caching lines in this file: https://github.com/lasso-js/lasso-babel-transform/blob/master/src/index.js
let's say: if the source code of the file hasn't changed, then return a cached babel.transform version. Makes sense?!
Rafael Sanches
@mufumbo
I wonder if the same concept should be applied to lasso-marko plugin
Rafael Sanches
@mufumbo
@DylanPiercey I have just created #299 with those ideas... it really works!
Dylan Piercey
@DylanPiercey
@mufumbo I think this is good, my main concern though is memory usage.
Rafael Sanches
@mufumbo
@DylanPiercey right now we save it as the /tmp/__lasso_marko_SOURCE_CODE_HASH.js disk files.. we do the comparison by hash code of the source code. makes sense?
so, if the file doesn't exist, it's not in cache, it's a MISS
the content of the file is the compiled version that is returned
basically, should use way less memory because it doesn't go through the compilation processes, and also when it's a MISS it doesn't load anything in memory (cache checks are made by hash code)
Dylan Piercey
@DylanPiercey
Gotcha. Makes sense to me!
@mlrawlings what are your thoughts?
Rafael Sanches
@mufumbo
btw, it's a great alternative to markoCompiler.checkUpToDate (which isn't implemented, returns always false).. making these types of caches into the plugins would remove a lot of complexity from markoCompiler that maybe doesn't need to know about caching (options.writeToDisk doesn't do anything today)
Michael Rawlings
@mlrawlings
Yeah. I think what you're doing with the caching on disk is a decent approach. Only thing I'd consider would be using a directory under the project root. Lasso already writes to a .cache directory and I think babel-loader for webpack uses node_modules/.cache.
Dylan Piercey
@DylanPiercey
I think it’d be best to just use a relative .cache folder to the package. That way if you install a different version of the package it will automatically remove the cache and also avoids conflicts with other tools.
Rafael Sanches
@mufumbo
yes! maybe also use babel/lasso/marko library versions as cache key
Poncho
@poncho-guerrero
Hey! i'm having trouble interpreting Error: Render async fragment error (lasso-slot:head). Exception: Error: Failed to walk dependency... errors, usually they are a huge block of text. This is happening when trying to import Amplify.js library. What information should I look for in this error messages?
Dylan Piercey
@DylanPiercey
@poncho-guerrero the error message is long because it shows the entire path of all the requires that lead up to the point of the error. If you start from the end of the message and work backwards it is usually the fastest way to tell where things went wrong. Usually this means that there is some dependency missing, some unsupported syntax in the code, or a module that is not meant to be sent to the browser is being sent.
Poncho
@poncho-guerrero
Is there a way I can determine if there is a missing dependency or if a wrong module is being sent to the browser. Specifically I'm having trouble on adding an import Amplify from 'aws-amplify';.
Lee Minh
@lhuuminh

Hi! I've a problem with lasso-marko-taglib.

with this code:

                <lasso-resource path=`./static/${product.url}` var="imgs"/> 
                <a class="uk-inline" href=`${imgs}` data-caption="Caption 1">
                <lasso-img src=`./static/${product.url}` alt=""/>
              </a>

Loop product list working good with lasso-img tag ; but with lasso-resource tag is get a error Render error. Exception: ReferenceError: product is not defined.