Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify Rollup configuration to fix build issues
Co-Authored-By: Francisco Javier Arceo <arceofrancisco@gmail.com>
  • Loading branch information
commit eaa3fc6228117ddd4f3f48fbb41f1cd41a0e801e
51 changes: 14 additions & 37 deletions ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,56 +23,28 @@ const banner = `
`;

const rollupConfig = [
// ES
{
input: inputFileName,
output: [
{
file: pkg.module,
dir: "dist",
entryFileNames: path.basename(pkg.module),
format: "es",
sourcemap: "inline",
banner,
exports: "named",
inlineDynamicImports: true,
},
],
external: [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.devDependencies || {}),
],
plugins: [
pluginTypescript(),
pluginCommonjs({
extensions: [".js", ".ts"],
}),
babel({
babelHelpers: "bundled",
configFile: path.resolve(__dirname, ".babelrc.js"),
}),
pluginNodeResolve({
browser: false,
}),
css({
output: "feast-ui.css",
}),
svg(),
json(),
copy({
targets: [{ src: "src/assets/**/*", dest: "dist/assets/" }],
}),
],
},

// CommonJS
{
input: inputFileName,
output: [
// CommonJS
{
file: pkg.main,
dir: "dist",
entryFileNames: path.basename(pkg.main),
format: "cjs",
sourcemap: "inline",
banner,
exports: "default",
},
inlineDynamicImports: true,
}
],
external: [
...Object.keys(pkg.dependencies || {}),
Expand All @@ -92,11 +64,16 @@ const rollupConfig = [
}),
css({
output: "feast-ui.css",
minify: true,
inject: false,
}),
svg(),
json(),
copy({
targets: [{ src: "src/assets/**/*", dest: "dist/assets/" }],
}),
],
},
}
];

export default rollupConfig;
Loading