mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-01-06 13:15:24 +08:00
Merge pull request #87 from lowdefy/webpack-config
feat: update webpack configs
This commit is contained in:
commit
19d68a1541
12
.pnp.js
generated
12
.pnp.js
generated
@ -3613,7 +3613,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@lowdefy/graphql", "workspace:packages/graphql"],
|
||||
["apollo-server-express", "virtual:b48bfc75325537b9d641f357739049b25dac71eb86a05d5744ecd259c67ce3d1110d501b0f5cd21b669aa2cda1c9f77cfe9c3e49e1202cba9683bd40f09e88bb#npm:2.18.2"],
|
||||
["babel-loader", "virtual:acf8ebf79a461c4f9f2ee32d35604720e52d54fc65cacbf3e944b2ad79cd4f17f95a2cb60cf4b37ca284c4f89981c732c25542cf20e548286d7eb31af1a6edda#npm:8.1.0"],
|
||||
["bundle-loader", "npm:0.5.6"],
|
||||
["css-loader", "virtual:acf8ebf79a461c4f9f2ee32d35604720e52d54fc65cacbf3e944b2ad79cd4f17f95a2cb60cf4b37ca284c4f89981c732c25542cf20e548286d7eb31af1a6edda#npm:5.0.0"],
|
||||
["express", "npm:4.17.1"],
|
||||
["graphql", "npm:15.3.0"],
|
||||
@ -3814,7 +3813,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@lowdefy/helpers", "workspace:packages/helpers"],
|
||||
["@lowdefy/layout", "workspace:packages/layout"],
|
||||
["babel-loader", "virtual:e7dd2bdbec1b3ec399e5f3318d0a58728583b58181f43cb8f4f372a1b2b9707e2ffcf76bd80aad3c5c64a731754028a8070020628ca4fa0a02fe260c179762ae#npm:8.1.0"],
|
||||
["bundle-loader", "npm:0.5.6"],
|
||||
["css-loader", "virtual:e7dd2bdbec1b3ec399e5f3318d0a58728583b58181f43cb8f4f372a1b2b9707e2ffcf76bd80aad3c5c64a731754028a8070020628ca4fa0a02fe260c179762ae#npm:5.0.0"],
|
||||
["graphql", "npm:15.3.0"],
|
||||
["graphql-type-json", "virtual:7fa6405098723f150ab741c1e73c906de11a676b4cc641bac8b3397ea2dd6efbb913e72a780932220533241b442cc586b41b26c7b5ac786de486992cd2db054c#npm:0.3.2"],
|
||||
@ -7139,16 +7137,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"linkType": "HARD",
|
||||
}]
|
||||
]],
|
||||
["bundle-loader", [
|
||||
["npm:0.5.6", {
|
||||
"packageLocation": "./.yarn/cache/bundle-loader-npm-0.5.6-0f4b65b6bd-398972f0d9.zip/node_modules/bundle-loader/",
|
||||
"packageDependencies": [
|
||||
["bundle-loader", "npm:0.5.6"],
|
||||
["loader-utils", "npm:1.4.0"]
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}]
|
||||
]],
|
||||
["busboy", [
|
||||
["npm:0.3.1", {
|
||||
"packageLocation": "./.yarn/cache/busboy-npm-0.3.1-87ec0dae5a-acc5c3d2f8.zip/node_modules/busboy/",
|
||||
|
Binary file not shown.
@ -25,7 +25,7 @@ module.exports = {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '10',
|
||||
node: '12',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -42,7 +42,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-react": "7.12.1",
|
||||
"babel-loader": "8.1.0",
|
||||
"bundle-loader": "0.5.6",
|
||||
"css-loader": "5.0.0",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"style-loader": "2.0.0",
|
||||
|
@ -23,7 +23,7 @@ const config = {
|
||||
DEPLOYMENT_ID: 'DEPLOYMENT_ID',
|
||||
DEPLOYMENT_NAME: 'DEPLOYMENT_NAME',
|
||||
DOMAIN_NAME: 'DOMAIN_NAME',
|
||||
CONFIGURATION_BASE_PATH: path.resolve(process.cwd(), 'config'),
|
||||
CONFIGURATION_BASE_PATH: path.resolve(process.cwd(), './.lowdefy/build'),
|
||||
logger: console,
|
||||
getHeadersFromInput: ({ req }) => req.headers,
|
||||
getSecrets: () => ({
|
||||
|
@ -14,5 +14,4 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import bootstrap from './bootstrap';
|
||||
bootstrap();
|
||||
import('./bootstrap');
|
||||
|
@ -11,13 +11,6 @@ module.exports = {
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /bootstrap\.js$/,
|
||||
loader: 'bundle-loader',
|
||||
options: {
|
||||
lazy: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel-loader',
|
||||
@ -41,18 +34,18 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new ModuleFederationPlugin({
|
||||
name: 'web-shell',
|
||||
library: { type: 'var', name: 'web-shell' },
|
||||
name: 'lowdefy_web_shell',
|
||||
shared: {
|
||||
...deps,
|
||||
react: {
|
||||
import: 'react', // the "react" package will be used a provided and fallback module
|
||||
shareKey: 'react', // under this name the shared module will be placed in the share scope
|
||||
shareScope: 'default', // share scope with this name will be used
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: deps.react,
|
||||
},
|
||||
'react-dom': {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: deps['react-dom'],
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
@ -24,7 +24,7 @@ module.exports = {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '10',
|
||||
node: '12',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -52,7 +52,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-react": "7.12.1",
|
||||
"babel-loader": "8.1.0",
|
||||
"bundle-loader": "0.5.6",
|
||||
"css-loader": "5.0.0",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"serve": "11.3.2",
|
||||
|
@ -14,5 +14,4 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import bootstrap from './bootstrap';
|
||||
bootstrap();
|
||||
import('./bootstrap');
|
||||
|
@ -19,13 +19,6 @@ module.exports = {
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /bootstrap\.js$/,
|
||||
loader: 'bundle-loader',
|
||||
options: {
|
||||
lazy: true,
|
||||
},
|
||||
},
|
||||
// TODO: FIXME: do NOT webpack 5 support with this
|
||||
// x-ref: https://github.com/webpack/webpack/issues/11467
|
||||
// waiting for babel fix: https://github.com/vercel/next.js/pull/17095#issuecomment-692435147
|
||||
@ -67,13 +60,14 @@ module.exports = {
|
||||
shared: {
|
||||
...deps,
|
||||
react: {
|
||||
import: 'react', // the "react" package will be used a provided and fallback module
|
||||
shareKey: 'react', // under this name the shared module will be placed in the share scope
|
||||
shareScope: 'default', // share scope with this name will be used
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: deps.react,
|
||||
},
|
||||
'react-dom': {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: deps['react-dom'],
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
13
yarn.lock
13
yarn.lock
@ -2809,7 +2809,6 @@ __metadata:
|
||||
"@lowdefy/graphql": 0.0.0-experimental.0
|
||||
apollo-server-express: 2.18.2
|
||||
babel-loader: 8.1.0
|
||||
bundle-loader: 0.5.6
|
||||
css-loader: 5.0.0
|
||||
express: 4.17.1
|
||||
graphql: 15.3.0
|
||||
@ -2992,7 +2991,6 @@ __metadata:
|
||||
"@lowdefy/helpers": 1.1.0
|
||||
"@lowdefy/layout": 1.0.0
|
||||
babel-loader: 8.1.0
|
||||
bundle-loader: 0.5.6
|
||||
css-loader: 5.0.0
|
||||
graphql: 15.3.0
|
||||
graphql-type-json: 0.3.2
|
||||
@ -5630,15 +5628,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"bundle-loader@npm:0.5.6":
|
||||
version: 0.5.6
|
||||
resolution: "bundle-loader@npm:0.5.6"
|
||||
dependencies:
|
||||
loader-utils: ^1.1.0
|
||||
checksum: 398972f0d9f58f351daae00683c0bf2bc422ad0d2cb26e448ec4718590cd752b2a21abb782dd1ac96d1561c676e6d2c321d316e711d92af1418d1bf559819e80
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"busboy@npm:^0.3.1":
|
||||
version: 0.3.1
|
||||
resolution: "busboy@npm:0.3.1"
|
||||
@ -11568,7 +11557,7 @@ fsevents@^1.2.7:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"loader-utils@npm:^1.1.0, loader-utils@npm:^1.2.3, loader-utils@npm:^1.4.0":
|
||||
"loader-utils@npm:^1.2.3, loader-utils@npm:^1.4.0":
|
||||
version: 1.4.0
|
||||
resolution: "loader-utils@npm:1.4.0"
|
||||
dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user