-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hi,
my organization would like to use ThunderJS library in node.js application running on STB. We would like to request for adding direct CommonJS support so that this library can be used without the need for additional translation.
I think the easiest way to achieve this is to add an extra target to the rollup.config.js file:
{
input: './src/thunderJS.js',
output: {
file: './dist/thunderJS.cjs',
format: 'cjs',
name: 'ThunderJS',
},
external: [ 'ws' ],
plugins: [
commonjs(),
cleanup(),
license({
banner: {
content: LicenseBanner,
},
}),
],
},
This will generate a new ./dist/thunderJS.cjs file. After committing the file to the repository, we can modify the "main" property of the package.json file to point to that file:
- "main": "src/thunderJS.js",
+ "main": "dist/thunderJS.cjs",
Metadata
Metadata
Assignees
Labels
No labels