Skip to content

Commit 597a66e

Browse files
committed
maint(pat-content-mirror): Align with latest stanards from pat-PATTERN_TEMPLATE.
1 parent b31d4a7 commit 597a66e

File tree

4 files changed

+28
-24
lines changed

4 files changed

+28
-24
lines changed

bundle-config.js bundle.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import registry from "@patternslib/patternslib/src/core/registry.js";
2-
import "./src/pat-content-mirror.js";
1+
import registry from "@patternslib/patternslib/src/core/registry";
2+
import "./src/pat-content-mirror";
33

44
registry.init();

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Webpack entry point for module federation.
2-
import "@patternslib/patternslib/webpack/module_federation";
3-
// The next import needs to be kept with brackets, otherwise we get this error:
2+
3+
// This import needs to be kept with brackets, otherwise we get this error:
44
// "Shared module is not available for eager consumption."
5-
import("./bundle-config");
5+
import("./bundle");

package.json

+15-14
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,27 @@
55
"license": "MIT",
66
"main": "./src/pat-content-mirror.js",
77
"dependencies": {
8+
"@patternslib/patternslib": "*",
89
"jquery": "^3.6.0"
910
},
1011
"devDependencies": {
11-
"@patternslib/dev": "^2.2.0",
12-
"@patternslib/patternslib": "*"
12+
"@patternslib/dev": "<4"
1313
},
1414
"scripts": {
1515
"start": "NODE_ENV=development webpack serve --config webpack.config.js",
16+
"watch": "NODE_ENV=development webpack --config webpack.config.js --watch",
1617
"build": "NODE_ENV=production webpack --config webpack.config.js",
1718
"build:dev": "NODE_ENV=development webpack --config webpack.config.js",
1819
"build:stats": "NODE_ENV=production webpack --config webpack.config.js --json > stats.json",
1920
"test": "jest"
2021
},
21-
"browserslist": {
22-
"production": [
23-
">0.2%",
24-
"not dead",
25-
"not op_mini all"
26-
]
27-
},
28-
"keywords": [
29-
"patternslib"
22+
"files": [
23+
"/dist",
24+
"/src"
25+
],
26+
"browserslist": [
27+
"defaults"
3028
],
31-
"publishConfig": {
32-
"access": "public"
33-
},
3429
"author": {
3530
"name": "Syslab GesmbH",
3631
"email": "[email protected]"
@@ -39,5 +34,11 @@
3934
"repository": {
4035
"type": "git",
4136
"url": "https://github.com/patternslib/pat-content-mirror.git"
37+
},
38+
"keywords": [
39+
"patternslib"
40+
],
41+
"publishConfig": {
42+
"access": "public"
4243
}
4344
}

webpack.config.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
process.traceDeprecation = true;
22
const mf_config = require("@patternslib/dev/webpack/webpack.mf");
33
const package_json = require("./package.json");
4+
const package_json_patternslib = require("@patternslib/patternslib/package.json");
45
const path = require("path");
5-
const patternslib_config = require("@patternslib/dev/webpack/webpack.config.js");
6-
const patternslib_package_json = require("@patternslib/patternslib/package.json");
6+
const webpack_config = require("@patternslib/dev/webpack/webpack.config").config;
77

8-
module.exports = async (env, argv) => {
8+
module.exports = () => {
99
let config = {
1010
entry: {
1111
"bundle.min": path.resolve(__dirname, "index.js"),
1212
},
1313
};
1414

15-
config = patternslib_config(env, argv, config);
15+
config = webpack_config({
16+
config: config,
17+
package_json: package_json,
18+
});
1619
config.output.path = path.resolve(__dirname, "dist/");
1720

1821
config.plugins.push(
1922
mf_config({
2023
name: package_json.name,
2124
remote_entry: config.entry["bundle.min"],
2225
dependencies: {
23-
...patternslib_package_json.dependencies,
26+
...package_json_patternslib.dependencies,
2427
...package_json.dependencies,
2528
},
2629
})

0 commit comments

Comments
 (0)