Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): add TsconfigPathsPlugin to WebPack & use faster build:esm #913

Merged
merged 5 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- run: pnpm --version

- name: TSC Build (esm)
run: pnpm build
run: pnpm build:esm:styles

- name: Website Prod Build (GitHub demo site)
run: pnpm build:demo
Expand Down
1 change: 1 addition & 0 deletions examples/webpack-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"sass": "^1.58.1",
"sass-loader": "^13.2.0",
"style-loader": "^3.3.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^5.0.0-beta",
"url-loader": "^4.1.1",
"webpack": "^5.75.0",
Expand Down
2 changes: 2 additions & 0 deletions examples/webpack-demo-vanilla-bundle/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { EsbuildPlugin } = require('esbuild-loader');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
Expand Down Expand Up @@ -79,6 +80,7 @@ module.exports = ({ production } = {}) => ({
poll: 1000, // Check for changes every second
},
plugins: [
new TsconfigPathsPlugin({}),
new ProvidePlugin({
'$': 'jquery',
'jQuery': 'jquery',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"cypress": "cypress open --config-file test/cypress.config.ts",
"cypress:ci": "cypress run --config-file test/cypress.config.ts",
"build:esm": "tsc --build ./tsconfig.packages.json",
"build:esm:styles": "pnpm build:esm && pnpm run -r --filter=./packages/common sass:copy",
"build:watch": "tsc --build ./tsconfig.packages.json --watch",
"predev": "pnpm build:esm && pnpm run -r sass:copy",
"predev": "pnpm build:esm:styles",
"dev": "run-p dev:watch webpack:watch",
"dev:watch": "lerna watch --no-bail --file-delimiter=\",\" --glob=\"src/**/*.{ts,scss}\" --ignored=\"src/**/*.spec.ts\" -- cross-env-shell pnpm run -r --filter $LERNA_PACKAGE_NAME dev",
"webpack:watch": "pnpm -r --parallel run webpack:dev",
Expand Down
20 changes: 20 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.