Skip to content

Instantly share code, notes, and snippets.

@osdevisnot
Created May 13, 2021 05:29
Show Gist options
  • Save osdevisnot/8de539148d17e04ed86a8252b4140756 to your computer and use it in GitHub Desktop.
Save osdevisnot/8de539148d17e04ed86a8252b4140756 to your computer and use it in GitHub Desktop.
rollup-globals-test
// process <<< Capitalize the P and error is GONE
export const rabbit = () => {
return import(`./empty.js`);
};
import { rabbit } from './loader.js';
rabbit();
export const noop = () => console.log('noop');
{
"name": "rollup-globals-test",
"version": "0.0.0",
"main": "index.js",
"author": "osdevisnot <osdevisnot@gmail.com>",
"license": "MIT",
"scripts": {
"build": "rollup -c rollup.config.js"
},
"devDependencies": {
"rollup": "^2.47.0",
"rollup-plugin-node-globals": "^1.4.0"
}
}
import nodeGlobals from "rollup-plugin-node-globals";
export default {
input: "src/main.js",
plugins: [nodeGlobals()],
output: {
file: "dist/bundle.js",
format: "cjs",
inlineDynamicImports: true,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment