-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
building the whole application doesn't work? #2950
Comments
I think you should refer to the rollup documentation... |
Well, using rollup directly (via rollup -c) works (after including the @rollup/plugin-node-resolve), but the way described in riot documentation ( |
@mjakubicek thank you for your feedback. The Riot CLI is meant to quickly compile your tags in case you want to include them as bundle in your application (using webpack, rollup...). Probably what you are looking for is more an application boilerplate setup and in that case I would you recommend to use |
@mjakubicek you are absolutely right, thank you. The doc should be updated! <script src='https://unpkg.com/riot@6.1.2/riot.js'></script> should solve the problem. |
@riotjs/cli@6.1.0 includes the rollup plugins to bundle the external dependencies. There is no need to update the documentation anymore. Thank you for your feedback @mjakubicek |
How is the building of the whole application under https://riot.js.org/compiler/#compilation-via-riotjs-cli supposed to work?
If I compile the sample code from the documentation, the line
import {component} from 'riot'
is kept in the output bundle, so it doesn't work in the browser. The compilation emits
'riot' is imported by app.js, but could not be resolved – treating it as an external dependency
Apparently riot uses rollup internally for the bundling, but adding into
app.js
import nodeResolve from '@rollup/plugin-node-resolve'
doesn't help either.
Any hints please?
The text was updated successfully, but these errors were encountered: