Skip to content

Commit aca3d98

Browse files
authored
Run Webpack during CI
1 parent 75c2236 commit aca3d98

File tree

4 files changed

+533
-14
lines changed

4 files changed

+533
-14
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,17 @@ jobs:
6161
with:
6262
github-token: ${{ secrets.github_token }}
6363
parallel-finished: true
64+
65+
webpack:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v3
69+
- uses: actions/cache@v3
70+
with:
71+
path: '**/node_modules'
72+
key: ${{ runner.os }}-webpack-modules-${{ hashFiles('**/yarn.lock') }}
73+
- uses: actions/setup-node@v3
74+
with:
75+
node-version: 18.x
76+
- run: yarn install
77+
- run: npx webpack

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@
4343
"manual-git-changelog": "^1.0.0",
4444
"pre-commit": "^1.2.2",
4545
"ts-jest": "^28.0.1",
46+
"ts-loader": "^9.3.1",
4647
"tslint": "^6.0.0",
4748
"tslint-eslint-rules": "^5.3.1",
48-
"typescript": "^4.0.0"
49+
"typescript": "^4.0.0",
50+
"webpack": "^5.73.0",
51+
"webpack-cli": "^4.10.0"
4952
},
5053
"jest": {
5154
"globals": {

webpack.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
entry: './lib/ContextParser.ts',
5+
mode: 'development',
6+
module: {
7+
rules: [
8+
{
9+
test: /\.tsx?$/,
10+
use: 'ts-loader',
11+
exclude: /node_modules/,
12+
},
13+
],
14+
},
15+
resolve: {
16+
extensions: ['.tsx', '.ts', '.js'],
17+
},
18+
output: {
19+
filename: 'out.js',
20+
path: path.resolve(__dirname, 'dist'),
21+
},
22+
};

0 commit comments

Comments
 (0)