Skip to content

Commit ed57074

Browse files
authored
chore: update deps (#34)
1 parent 60e8d37 commit ed57074

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

antd-sample/app.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class App extends React.Component {
9393
}
9494
return (
9595
<Layout>
96-
<Header className="header"></Header>
96+
<Header className="header" />
9797
<Content style={{ padding: 30 }}>
9898
<Select
9999
className="test-list"
@@ -113,7 +113,7 @@ class App extends React.Component {
113113
<Table columns={columns} dataSource={this.state.dataList} />
114114
</Spin>
115115
</Content>
116-
<Footer/>
116+
<Footer />
117117
</Layout>
118118
);
119119
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "https://github.com/app-bootstrap/web-app-bootstrap.git"
1414
},
1515
"scripts": {
16-
"dev": "cross-env NODE_ENV=development webpack serve",
16+
"dev": "webpack serve",
1717
"dev:test": "cross-env NODE_ENV=test npm run dev",
1818
"lint": "eslint --fix . --ext .vue,.jsx,.js && stylelint --fix assets/**/*.less -s less",
1919
"build": "cross-env NODE_ENV=production webpack",
@@ -103,7 +103,7 @@
103103
"vue-loader": "^15.2.1",
104104
"vue-template-compiler": "^2.5.13",
105105
"vuex": "^3.0.1",
106-
"webpack": "^5.69.1",
106+
"webpack": "5",
107107
"webpack-cli": "^4.9.0",
108108
"webpack-dev-server": "^4.7.4",
109109
"whatwg-fetch": "^2.0.4",

webpack.config.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin');
66
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
77
const datahubMiddleware = require('datahub-proxy-middleware');
88

9+
const {
10+
NODE_ENV,
11+
} = process.env;
12+
13+
const isProd = NODE_ENV === 'production';
14+
915
const datahubConfig = {
1016
port: 5678,
1117
hostname: '127.0.0.1',
@@ -26,6 +32,7 @@ const defaultDatahub = new DataHub({
2632
});
2733

2834
const config = {
35+
mode: isProd ? 'production' : 'development',
2936
entry: {
3037
vuex: path.resolve('vuex'),
3138
flux: path.resolve('flux'),
@@ -40,7 +47,7 @@ const config = {
4047
},
4148
output: {
4249
path: path.join(__dirname, 'dist'),
43-
publicPath: 'dist',
50+
publicPath: '/dist',
4451
filename: '[name].js'
4552
},
4653
module: {
@@ -145,7 +152,12 @@ const config = {
145152
]
146153
},
147154
resolve: {
148-
extensions: ['.ts', '.js', '.vue', '.json'],
155+
extensions: [
156+
'.ts', '.tsx',
157+
'.js', '.jsx',
158+
'.vue',
159+
'.json',
160+
],
149161
alias: {
150162
'vue$': 'vue/dist/vue.esm.js'
151163
}

0 commit comments

Comments
 (0)