Created
May 13, 2021 05:29
-
-
Save osdevisnot/8de539148d17e04ed86a8252b4140756 to your computer and use it in GitHub Desktop.
rollup-globals-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// process <<< Capitalize the P and error is GONE | |
export const rabbit = () => { | |
return import(`./empty.js`); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { rabbit } from './loader.js'; | |
rabbit(); | |
export const noop = () => console.log('noop'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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