File tree 4 files changed +28
-24
lines changed
4 files changed +28
-24
lines changed Original file line number Diff line number Diff line change 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" ;
3
3
4
4
registry . init ( ) ;
Original file line number Diff line number Diff line change 1
1
// 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:
4
4
// "Shared module is not available for eager consumption."
5
- import ( "./bundle-config " ) ;
5
+ import ( "./bundle" ) ;
Original file line number Diff line number Diff line change 5
5
"license" : " MIT" ,
6
6
"main" : " ./src/pat-content-mirror.js" ,
7
7
"dependencies" : {
8
+ "@patternslib/patternslib" : " *" ,
8
9
"jquery" : " ^3.6.0"
9
10
},
10
11
"devDependencies" : {
11
- "@patternslib/dev" : " ^2.2.0" ,
12
- "@patternslib/patternslib" : " *"
12
+ "@patternslib/dev" : " <4"
13
13
},
14
14
"scripts" : {
15
15
"start" : " NODE_ENV=development webpack serve --config webpack.config.js" ,
16
+ "watch" : " NODE_ENV=development webpack --config webpack.config.js --watch" ,
16
17
"build" : " NODE_ENV=production webpack --config webpack.config.js" ,
17
18
"build:dev" : " NODE_ENV=development webpack --config webpack.config.js" ,
18
19
"build:stats" : " NODE_ENV=production webpack --config webpack.config.js --json > stats.json" ,
19
20
"test" : " jest"
20
21
},
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"
30
28
],
31
- "publishConfig" : {
32
- "access" : " public"
33
- },
34
29
"author" : {
35
30
"name" : " Syslab GesmbH" ,
36
31
39
34
"repository" : {
40
35
"type" : " git" ,
41
36
"url" : " https://github.com/patternslib/pat-content-mirror.git"
37
+ },
38
+ "keywords" : [
39
+ " patternslib"
40
+ ],
41
+ "publishConfig" : {
42
+ "access" : " public"
42
43
}
43
44
}
Original file line number Diff line number Diff line change 1
1
process . traceDeprecation = true ;
2
2
const mf_config = require ( "@patternslib/dev/webpack/webpack.mf" ) ;
3
3
const package_json = require ( "./package.json" ) ;
4
+ const package_json_patternslib = require ( "@patternslib/patternslib/package.json" ) ;
4
5
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 ;
7
7
8
- module . exports = async ( env , argv ) => {
8
+ module . exports = ( ) => {
9
9
let config = {
10
10
entry : {
11
11
"bundle.min" : path . resolve ( __dirname , "index.js" ) ,
12
12
} ,
13
13
} ;
14
14
15
- config = patternslib_config ( env , argv , config ) ;
15
+ config = webpack_config ( {
16
+ config : config ,
17
+ package_json : package_json ,
18
+ } ) ;
16
19
config . output . path = path . resolve ( __dirname , "dist/" ) ;
17
20
18
21
config . plugins . push (
19
22
mf_config ( {
20
23
name : package_json . name ,
21
24
remote_entry : config . entry [ "bundle.min" ] ,
22
25
dependencies : {
23
- ...patternslib_package_json . dependencies ,
26
+ ...package_json_patternslib . dependencies ,
24
27
...package_json . dependencies ,
25
28
} ,
26
29
} )
You can’t perform that action at this time.
0 commit comments