-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Mention that successfully bundling requires rollup-plugin-node-resolve #54
Comments
import svelte from 'rollup-plugin-svelte';
import resolve from 'rollup-plugin-node-resolve';
// install with: npm i -D rollup-plugin-commonjs
import commonjs from 'rollup-plugin-commonjs'
export default {
input: 'src/main.js',
output: {
file: 'dist/bundle.js',
format: 'iife'
},
plugins: [
svelte({
// You can restrict which files are compiled
// using `include` and `exclude`
include: 'src/**/*.svelte',
}),
resolve(),
commonjs()
]
} |
I'm getting the same error when I install Svelte in a yarn workspace. However, it works properly when I install it via Not sure if this should be its own issue. |
@ghosh same issue here re workspaces |
For anyone else that hits this issue when using yarn workspaces, you can work around it by avoiding the hoisting of "workspaces": {
"packages": [ "packages/*" ],
"nohoist": [
"**/rollup-plugin-svelte",
"**/rollup-plugin-svelte/**"
]
} |
Just a note here that when using Yarn Workspaces, because the packages are symlinked they are resolved absolutely, so I fixed it by adding |
I observed this in my electron-svelte app. instead of yarn run autobuild use npm run autobuild did solved my issue. |
This worked for me, except replacing the archived/deprecated Specifically upgrading |
* chore: mention `resolve` plugin in readme - Closes #54 * chore: wordy
I'm a super n00b at this Rollup thingymobobber, but I've been trying to build my own app using Svelte from scratch — WITHOUT using a boilerplate. I tried copy-pasting the example in the README.md, but it didn't work. Rollup was giving me this error:
I tried importing
svelte/internal
in node, and it worked fine. Eventually, I looked at some GitHub examples of Svelte 3 + Rollup, and found this plugin required for ALL of them:rollup-plugin-node-resolve
. I popped it into my config:And everything worked!
ACTION ITEM
State in the README that
rollup-plugin-node-resolve
is required and must be used to have a fully workingrollup.config.js
.The text was updated successfully, but these errors were encountered: