Skip to content

Commit 72a2082

Browse files
committed
fix build
1 parent a1fd315 commit 72a2082

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
lib
12
# Logs
23
logs
34
*.log

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"main": "index.js",
55
"scripts": {
66
"test": "jest",
7-
"build": "npm run build:dev && npm run build:prod",
8-
"build:prod": "NODE_ENV=production rollup --config",
9-
"build:dev": "NODE_ENV=development rollup --config",
7+
"build": "rollup --config",
108
"build:local": "npm run build && npm pack",
119
"storybook": "start-storybook -p 6006 --no-dll",
1210
"build-storybook": "build-storybook --no-dll",

rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import babel from "@rollup/plugin-babel";
22
import resolve from "@rollup/plugin-node-resolve";
33
import commonjs from "@rollup/plugin-commonjs";
44
import replace from "@rollup/plugin-replace";
5-
import json from "@rollup/plugin-json";
65
import peerDepsExternal from "rollup-plugin-peer-deps-external";
76

8-
const NODE_ENV = process.env.NODE_ENV || "development";
9-
const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js";
7+
const outputFile = "./lib/index.js";
8+
const NODE_ENV = "production";
109

1110
const extensions = [".js", ".jsx"];
1211

@@ -24,7 +23,6 @@ export default {
2423
external: ["react", "react-dom", /@babel\/runtime/],
2524
plugins: [
2625
peerDepsExternal(),
27-
json(),
2826
replace({
2927
"process.env.NODE_ENV": JSON.stringify(NODE_ENV),
3028
}),
File renamed without changes.

0 commit comments

Comments
 (0)