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

Rollup and Sanctuary #707

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

edlimerkaj
Copy link

No description provided.

Comment on lines +337 to +340
//. If you are using rollup in your project, where you have integrated Sanctuary, you might
//. get errors. Please import builtins and globals from rollup-plugin-node-builtins and
//. rollup-plugin-node-globals respectively, in the rollup config file. These are needed to add
//. the utils folder, which is referenced in the sanctuary code.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Could you share the snippet from your Rollup config file? Perhaps we could include that here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sure. Here is my rollup.config file for a simple project, where I've used Sanctuary and rollup:

import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';

export default {
input: './src/main.js',
output: {
file: './build/bundle.min.js',
format: 'iife',
name: 'bundle'
},
plugins: [
nodeResolve({ preferBuiltins: false }), // or true
commonjs(),
globals(),
builtins()]
}
;

@davidchambers
Copy link
Member

I'm sorry for dropping the ball, @edlimerkaj. Do you know whether the incompatibility still exists, more than two years later?

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

Successfully merging this pull request may close these issues.

None yet

2 participants