Skip to content

Commit 9a9bf9f

Browse files
author
powerfulyang
committed
feat: select-type
1 parent de6ccfe commit 9a9bf9f

File tree

16 files changed

+542
-375
lines changed

16 files changed

+542
-375
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DEV_BASE_URL=https://qa.powerfulyang.com

config/webpack.base.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ module.exports = {
4040
},
4141
},
4242
output: {
43-
filename: 'bundle.js',
43+
filename: '[name].[contenthash].js',
4444
path: path.resolve(__dirname, '../dist'),
45+
clean: true,
4546
},
4647
plugins: [
4748
new HTMLWebpackPlugin({
@@ -55,4 +56,16 @@ module.exports = {
5556
'process.env.BASE_URL': JSON.stringify(process.env.BASE_URL || ''),
5657
}),
5758
],
59+
optimization: {
60+
runtimeChunk: 'single',
61+
splitChunks: {
62+
cacheGroups: {
63+
vendor: {
64+
test: /[\\/]node_modules[\\/]/,
65+
name: 'vendors',
66+
chunks: 'all',
67+
},
68+
},
69+
},
70+
},
5871
};

config/webpack.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = merge(common, {
1515
},
1616
proxy: {
1717
'/api': {
18-
target: process.env.DEV_URL || 'https://api.powerfulyang.com',
18+
target: process.env.DEV_BASE_URL,
1919
changeOrigin: true,
2020
},
2121
},

src/__test__/dates.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('dates', () => {
66
const start = new Date('2021-01-01');
77
const end = new Date('2021-01-03');
88
const extent = [start, end];
9-
const dateRange = d3.scaleUtc().domain(extent).ticks(d3.utcDay);
9+
const dateRange = d3.scaleTime().domain(extent).ticks(d3.timeDay);
1010
const diffCount = dayjs(end).diff(start, 'day');
1111
expect(dateRange.length).toEqual(diffCount + 1);
1212
});

src/base.ts

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

0 commit comments

Comments
 (0)