Skip to content

Commit 0be285a

Browse files
committed
Trying webpack 4 build :)
1 parent 5ea792e commit 0be285a

File tree

9 files changed

+2662
-1102
lines changed

9 files changed

+2662
-1102
lines changed

dist/aspnet-validation.js

Lines changed: 18 additions & 719 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/aspnet-validation.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/aspnet-validation.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "aspnet-validation",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Enables ASP.NET Core MVC client-side validation, without JQuery!",
55
"main": "./dist/aspnet-validation.js",
6-
"types": "./types/index.d.ts",
6+
"types": "./dist/types/index.d.ts",
77
"repository": "https://github.com/ryanelian/aspnet-validation",
88
"bugs": {
99
"url": "https://github.com/ryanelian/aspnet-validation/issues"
@@ -15,10 +15,10 @@
1515
"build": "webpack && webpack --config webpack.config.min.js"
1616
},
1717
"devDependencies": {
18-
"ts-loader": "^3.1.1",
19-
"typescript": "^2.6.1",
20-
"uglifyjs-webpack-plugin": "^1.1.0",
21-
"webpack": "^3.8.1"
18+
"ts-loader": "^4.0.0",
19+
"typescript": "^2.7.2",
20+
"webpack": "^4.0.1",
21+
"webpack-cli": "^2.0.9"
2222
},
2323
"dependencies": {}
2424
}

tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@
44
"noImplicitThis": true,
55
"alwaysStrict": true,
66
"strictNullChecks": false,
7-
"skipLibCheck": true,
87
"strictFunctionTypes": true,
8+
"strictPropertyInitialization": true,
9+
"skipLibCheck": true,
910

1011
"noUnusedLocals": false,
1112
"noUnusedParameters": false,
1213
"noImplicitReturns": true,
1314
"noFallthroughCasesInSwitch": true,
15+
16+
"experimentalDecorators": true,
17+
"allowSyntheticDefaultImports": true,
1418

19+
"noEmit": true,
1520
"target": "es5",
1621
"module": "es2015",
1722
"moduleResolution": "node",
18-
"noEmit": true,
23+
"importHelpers": false,
24+
"jsx": "react",
1925

2026
"lib": [
2127
"dom",

webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require('path');
2+
13
let tsconfigOverride = {
24
declaration: true,
35
declarationDir: 'types',
@@ -7,11 +9,14 @@ let tsconfigOverride = {
79

810
module.exports = {
911
entry: "./src/index.ts",
12+
mode: "development",
1013
output: {
11-
filename: './dist/aspnet-validation.js',
14+
filename: 'aspnet-validation.js',
15+
path: path.resolve(__dirname, 'dist'),
1216
library: 'aspnetValidation',
1317
libraryTarget: 'umd'
1418
},
19+
// devtool: 'inline-source-map',
1520
resolve: {
1621
extensions: ['.ts', '.tsx', '.js']
1722
},

webpack.config.min.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const webpack = require('webpack');
22
const uglifyES = require('uglifyjs-webpack-plugin');
3+
const path = require('path');
34

45
let tsconfigOverride = {
56
declaration: false,
@@ -9,20 +10,24 @@ let tsconfigOverride = {
910

1011
module.exports = {
1112
entry: "./src/index.ts",
13+
mode: "production",
1214
output: {
13-
filename: './dist/aspnet-validation.min.js',
15+
filename: 'aspnet-validation.min.js',
16+
path: path.resolve(__dirname, 'dist'),
1417
library: 'aspnetValidation',
1518
libraryTarget: 'umd'
1619
},
1720
devtool: 'source-map',
18-
plugins: [
19-
new uglifyES({
20-
sourceMap: true,
21-
uglifyOptions: {
22-
ecma: 5
23-
}
24-
})
25-
],
21+
optimization: {
22+
minimizer: [
23+
new uglifyES({
24+
sourceMap: true,
25+
uglifyOptions: {
26+
ecma: 5
27+
}
28+
})
29+
],
30+
},
2631
resolve: {
2732
extensions: ['.ts', '.tsx', '.js']
2833
},

0 commit comments

Comments
 (0)