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

Allow requiring non-JS dependencies to work on the server. Example: require('./foo.css') #57

Closed
patrick-steele-idem opened this issue Jun 24, 2015 · 0 comments

Comments

@patrick-steele-idem
Copy link
Contributor

Given the following code:

require('./foo.css');

If Node.js executes the above line then it will throw an error because it will try to load the ./foo.css as a JavaScript module when it really just CSS code. The reason for including require('./foo.css') in the JavaScript code is allow the ./foo.css dependency to be discovered via static code analysis by the Lasso.js tool and automatically bundled with all of the other require CSS code. On the server (and in the browser) the actual require should be a no-op.

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

No branches or pull requests

1 participant