Skip to content

Rollup and Sanctuary#707

Open
edlimerkaj wants to merge 3 commits intosanctuary-js:mainfrom
edlimerkaj:rollupconfig
Open

Rollup and Sanctuary#707
edlimerkaj wants to merge 3 commits intosanctuary-js:mainfrom
edlimerkaj:rollupconfig

Conversation

@edlimerkaj
Copy link
Copy Markdown

No description provided.

Comment thread index.js
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants