Skip to content

Commit ac046cc

Browse files
Consolidate rollup configs
1 parent 89b6e47 commit ac046cc

File tree

3 files changed

+6
-57
lines changed

3 files changed

+6
-57
lines changed

packages/webpack-plugin/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,8 @@
3636
"scripts": {
3737
"build": "rimraf ./dist && run-p build:rollup build:types",
3838
"build:watch": "run-p build:rollup:watch build:types:watch",
39-
"build:rollup": "run-p build:rollup:default build:rollup:webpack5",
40-
"build:rollup:default": "rollup --config rollup.config.default.js",
41-
"build:rollup:webpack5": "rollup --config rollup.config.webpack5.js",
42-
"build:rollup:watch": "run-p build:rollup:default:watch build:rollup:webpack5:watch",
43-
"build:rollup:default:watch": "rollup --config rollup.config.default.js --watch --no-watch.clearScreen",
44-
"build:rollup:webpack5:watch": "rollup --config rollup.config.webpack5.js --watch --no-watch.clearScreen",
39+
"build:rollup": "rollup --config rollup.config.js",
40+
"build:rollup:watch": "rollup --config rollup.config.js --watch --no-watch.clearScreen",
4541
"build:types": "tsc --project types.tsconfig.json",
4642
"build:types:watch": "tsc --project types.tsconfig.json --watch --preserveWatchOutput",
4743
"check:types": "run-p check:types:src check:types:test",

packages/webpack-plugin/rollup.config.default.js renamed to packages/webpack-plugin/rollup.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import babel from "@rollup/plugin-babel";
33
import packageJson from "./package.json";
44
import modulePackage from "module";
55

6-
const input = ["src/index.ts"];
6+
const input = ["src/index.ts", "src/webpack5.ts"];
77

88
const extensions = [".ts"];
99

@@ -33,13 +33,14 @@ export default {
3333
],
3434
output: [
3535
{
36-
file: packageJson.module,
36+
dir: "./dist/esm",
3737
format: "esm",
3838
exports: "named",
3939
sourcemap: true,
40+
entryFileNames: "[name].mjs",
4041
},
4142
{
42-
file: packageJson.main,
43+
dir: "./dist/cjs",
4344
format: "cjs",
4445
exports: "named",
4546
sourcemap: true,

packages/webpack-plugin/rollup.config.webpack5.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)