Combine multiple es6 classes into single library using rollup js
How can I import a.js
and b.js
and export as combined bundle.js
in UMD format using rollupjs?
Here is the example:
//a.js
export default class A
...
//b.js
export default class B
...
My current rollup.config.js
is:
export default [
input: ["path/a.js", "path/b.js"],
output:
file: "path/bundle.js",
format: "umd",
name: "Bundle"
,
plugins: [
// list of plugins
]
}
However, this is not working as intended.
Anything wrong with this config?
Thanks for your help.
rollup rollupjs umd
add a comment |Â
How can I import a.js
and b.js
and export as combined bundle.js
in UMD format using rollupjs?
Here is the example:
//a.js
export default class A
...
//b.js
export default class B
...
My current rollup.config.js
is:
export default [
input: ["path/a.js", "path/b.js"],
output:
file: "path/bundle.js",
format: "umd",
name: "Bundle"
,
plugins: [
// list of plugins
]
}
However, this is not working as intended.
Anything wrong with this config?
Thanks for your help.
rollup rollupjs umd
add a comment |Â
How can I import a.js
and b.js
and export as combined bundle.js
in UMD format using rollupjs?
Here is the example:
//a.js
export default class A
...
//b.js
export default class B
...
My current rollup.config.js
is:
export default [
input: ["path/a.js", "path/b.js"],
output:
file: "path/bundle.js",
format: "umd",
name: "Bundle"
,
plugins: [
// list of plugins
]
}
However, this is not working as intended.
Anything wrong with this config?
Thanks for your help.
rollup rollupjs umd
How can I import a.js
and b.js
and export as combined bundle.js
in UMD format using rollupjs?
Here is the example:
//a.js
export default class A
...
//b.js
export default class B
...
My current rollup.config.js
is:
export default [
input: ["path/a.js", "path/b.js"],
output:
file: "path/bundle.js",
format: "umd",
name: "Bundle"
,
plugins: [
// list of plugins
]
}
However, this is not working as intended.
Anything wrong with this config?
Thanks for your help.
rollup rollupjs umd
rollup rollupjs umd
asked Jun 4 at 16:40
sungl
3101311
3101311
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
You need a file to tie them together. So along with a.js
and b.js
, have a main.js
that looks like this:
import A from './a';
import B from './b';
export default
A,
B,
;
Then update your rollup.config.js
with input: path/main.js
.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need a file to tie them together. So along with a.js
and b.js
, have a main.js
that looks like this:
import A from './a';
import B from './b';
export default
A,
B,
;
Then update your rollup.config.js
with input: path/main.js
.
add a comment |Â
You need a file to tie them together. So along with a.js
and b.js
, have a main.js
that looks like this:
import A from './a';
import B from './b';
export default
A,
B,
;
Then update your rollup.config.js
with input: path/main.js
.
add a comment |Â
You need a file to tie them together. So along with a.js
and b.js
, have a main.js
that looks like this:
import A from './a';
import B from './b';
export default
A,
B,
;
Then update your rollup.config.js
with input: path/main.js
.
You need a file to tie them together. So along with a.js
and b.js
, have a main.js
that looks like this:
import A from './a';
import B from './b';
export default
A,
B,
;
Then update your rollup.config.js
with input: path/main.js
.
answered Nov 11 at 0:15
austingray
767515
767515
add a comment |Â
add a comment |Â
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid â¦
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid â¦
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50685153%2fcombine-multiple-es6-classes-into-single-library-using-rollup-js%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown