@meteorjs/rspack 2.0.1 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/rspack.config.js +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meteorjs/rspack",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "Configuration logic for using Rspack in Meteor projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
"semver": "^7.7.4"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@rspack/cli": ">=
|
|
24
|
-
"@rspack/core": ">=
|
|
23
|
+
"@rspack/cli": ">=2.0.0",
|
|
24
|
+
"@rspack/core": ">=2.0.0",
|
|
25
|
+
"@rspack/dev-server": ">=2.0.0",
|
|
25
26
|
"@swc/core": ">=1.3.0"
|
|
26
27
|
}
|
|
27
28
|
}
|
package/rspack.config.js
CHANGED
|
@@ -647,11 +647,13 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
647
647
|
},
|
|
648
648
|
]
|
|
649
649
|
: []),
|
|
650
|
+
{ test: /\.css$/, type: "css/auto" },
|
|
650
651
|
...extraRules,
|
|
651
652
|
],
|
|
652
653
|
},
|
|
653
654
|
resolve: { extensions, alias, fallback },
|
|
654
655
|
externals,
|
|
656
|
+
externalsType: "commonjs2",
|
|
655
657
|
plugins: [
|
|
656
658
|
...[
|
|
657
659
|
...(isReactEnabled && reactRefreshModule && isDevEnvironment
|
|
@@ -691,12 +693,15 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
691
693
|
...(Meteor.isBlazeEnabled && { hot: false }),
|
|
692
694
|
port: devServerPort,
|
|
693
695
|
devMiddleware: {
|
|
694
|
-
writeToDisk: createPersistCallback({
|
|
696
|
+
writeToDisk: createPersistCallback({
|
|
697
|
+
once: ["sw.js"],
|
|
698
|
+
always: [".html"],
|
|
699
|
+
}),
|
|
695
700
|
},
|
|
696
701
|
onListening: meteorDefaultOnListening,
|
|
697
702
|
},
|
|
698
703
|
}),
|
|
699
|
-
...
|
|
704
|
+
...cacheStrategy,
|
|
700
705
|
...lazyCompilationConfig,
|
|
701
706
|
...loggingConfig,
|
|
702
707
|
};
|
|
@@ -776,6 +781,7 @@ module.exports = async function (inMeteor = {}, argv = {}) {
|
|
|
776
781
|
conditionNames: ["import", "require", "node", "default"],
|
|
777
782
|
},
|
|
778
783
|
externals,
|
|
784
|
+
externalsType: "commonjs2",
|
|
779
785
|
externalsPresets: { node: true },
|
|
780
786
|
plugins: [
|
|
781
787
|
new DefinePlugin(
|