File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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" ;
33
44registry . init ( ) ;
Original file line number Diff line number Diff line change 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" ) ;
Original file line number Diff line number Diff line change 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" : " dev@syslab.com"
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}
Original file line number Diff line number Diff line change 11process . traceDeprecation = true ;
22const mf_config = require ( "@patternslib/dev/webpack/webpack.mf" ) ;
33const package_json = require ( "./package.json" ) ;
4+ const package_json_patternslib = require ( "@patternslib/patternslib/package.json" ) ;
45const 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 } )
You can’t perform that action at this time.
0 commit comments