Skip to content

Commit

Permalink
fix: move @types/webpack-sources to dependencies (close: #5867)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amour1688 committed Mar 6, 2024
1 parent debe2bc commit b9b2577
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@rspack/plugin-minify": "workspace:^",
"@rspack/plugin-node-polyfill": "workspace:^",
"@types/watchpack": "^2.4.0",
"@types/webpack-sources": "3.2.3",
"@types/ws": "8.5.10",
"babel-loader": "^9.1.0",
"babel-plugin-import": "^1.13.5",
Expand Down Expand Up @@ -66,6 +65,7 @@
"dependencies": {
"@module-federation/runtime-tools": "0.0.8",
"@rspack/binding": "workspace:*",
"@types/webpack-sources": "3.2.3",
"browserslist": "^4.21.3",
"enhanced-resolve": "5.12.0",
"events": "^3.3.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export const WebpackError = Error;

export type { Watching } from "./Watching";

const sources = require("webpack-sources"); // use require to avoid wrong types, @types/webpack-sources is outdate
export { sources };
export { Source as sources } from "webpack-sources";

import {
getNormalizedRspackOptions,
Expand Down
9 changes: 3 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit b9b2577

Please sign in to comment.