Skip to content

Commit ed1ba76

Browse files
Delete voyager.min.js from the dist (#319)
1 parent 15f7cdf commit ed1ba76

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
"serve": "ts-node ./scripts/serve-directory.ts -p 9090 demo-dist",
1818
"clean:release": "rm -rf middleware",
1919
"clean:worker": "rm -rf worker-dist",
20-
"bundle:min": "webpack --config=webpack.config.ts --mode=production --env min",
2120
"bundle:standalone": "webpack --config=webpack.config.ts --mode=production --env standalone",
2221
"bundle:lib": "webpack --config=webpack.config.ts --mode=production --env lib",
23-
"bundle": "rm -rf dist && npm run bundle:lib && npm run bundle:standalone && npm run bundle:min",
22+
"bundle": "rm -rf dist && npm run bundle:lib && npm run bundle:standalone",
2423
"compile:middleware": "tsc -d src/middleware/index.ts --outDir middleware --lib ES6,DOM,esnext.asynciterable",
2524
"build:worker": "npm run clean:worker && docker-compose up --abort-on-container-exit --build build-worker",
2625
"build:release": "npm run build:worker && npm run bundle && npm run compile:middleware && npm run declarations",

webpack.config.ts

-27
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const BANNER = `GraphQL Voyager - Represent any GraphQL API as an interactive gr
1111
Repo: ${packageJSON.repository.url}`;
1212

1313
interface Env {
14-
min?: boolean;
1514
lib?: boolean;
1615
standalone?: boolean;
1716
}
@@ -42,32 +41,6 @@ export default function buildWebpackConfig(env: Env): webpack.Configuration {
4241
};
4342
}
4443

45-
// TODO: delete in next major version
46-
if (env.min === true) {
47-
return {
48-
...baseConfig,
49-
entry: './src/index.tsx',
50-
optimization: { minimize: true },
51-
externals: {
52-
react: {
53-
root: 'React',
54-
commonjs2: 'react',
55-
commonjs: 'react',
56-
amd: 'react',
57-
},
58-
'react-dom': {
59-
root: 'ReactDOM',
60-
commonjs2: 'react-dom',
61-
commonjs: 'react-dom',
62-
amd: 'react-dom',
63-
},
64-
},
65-
output: {
66-
...baseConfig.output,
67-
filename: 'voyager.min.js',
68-
},
69-
};
70-
}
7144
throw new Error('Please specify correct env');
7245
}
7346

0 commit comments

Comments
 (0)