create-zephyr-apps 0.0.6 → 0.0.7
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/dist/index.cjs +28 -7
- package/dist/index.mjs +28 -7
- package/package/index.ts +2 -1
- package/package/utils/end.ts +26 -7
- package/package.json +1 -1
- package/vite-mf/host/README.md +0 -50
- package/vite-mf/host/eslint.config.js +0 -25
- package/vite-mf/host/index.html +0 -13
- package/vite-mf/host/package.json +0 -31
- package/vite-mf/host/public/vite.svg +0 -1
- package/vite-mf/host/src/App.css +0 -42
- package/vite-mf/host/src/App.tsx +0 -37
- package/vite-mf/host/src/assets/react.svg +0 -1
- package/vite-mf/host/src/bootstrap.tsx +0 -10
- package/vite-mf/host/src/index.css +0 -68
- package/vite-mf/host/src/main.tsx +0 -8
- package/vite-mf/host/src/vite-env.d.ts +0 -1
- package/vite-mf/host/tsconfig.app.json +0 -24
- package/vite-mf/host/tsconfig.json +0 -4
- package/vite-mf/host/tsconfig.node.json +0 -22
- package/vite-mf/host/vite.config.ts +0 -40
- package/vite-mf/image.png +0 -0
- package/vite-mf/package.json +0 -12
- package/vite-mf/pnpm-lock.yaml +0 -9440
- package/vite-mf/pnpm-workspace.yaml +0 -2
- package/vite-mf/readme.md +0 -17
- package/vite-mf/remote/eslint.config.js +0 -25
- package/vite-mf/remote/index.html +0 -13
- package/vite-mf/remote/package.json +0 -31
- package/vite-mf/remote/public/vite.svg +0 -1
- package/vite-mf/remote/src/App.css +0 -38
- package/vite-mf/remote/src/App.tsx +0 -24
- package/vite-mf/remote/src/Button.css +0 -9
- package/vite-mf/remote/src/Button.tsx +0 -20
- package/vite-mf/remote/src/assets/react.svg +0 -1
- package/vite-mf/remote/src/bootstrap.tsx +0 -10
- package/vite-mf/remote/src/index.css +0 -68
- package/vite-mf/remote/src/main.tsx +0 -10
- package/vite-mf/remote/src/vite-env.d.ts +0 -1
- package/vite-mf/remote/tsconfig.app.json +0 -24
- package/vite-mf/remote/tsconfig.json +0 -4
- package/vite-mf/remote/tsconfig.node.json +0 -22
- package/vite-mf/remote/vite.config.ts +0 -25
- package/vite-mf/rspack/.babelrc +0 -6
- package/vite-mf/rspack/compilation.config.js +0 -31
- package/vite-mf/rspack/package.json +0 -32
- package/vite-mf/rspack/postcss.config.js +0 -6
- package/vite-mf/rspack/rspack.config.js +0 -110
- package/vite-mf/rspack/src/App.tsx +0 -21
- package/vite-mf/rspack/src/Image.tsx +0 -18
- package/vite-mf/rspack/src/assets/rspack-logo.png +0 -0
- package/vite-mf/rspack/src/global.d.ts +0 -4
- package/vite-mf/rspack/src/index.css +0 -7
- package/vite-mf/rspack/src/index.html +0 -12
- package/vite-mf/rspack/src/index.tsx +0 -1
- package/vite-mf/rspack/tailwind.config.js +0 -11
- package/vite-mf/rspack/tsconfig.json +0 -29
- package/vite-mf/webpack/.babelrc +0 -13
- package/vite-mf/webpack/compilation.config.js +0 -31
- package/vite-mf/webpack/package.json +0 -46
- package/vite-mf/webpack/postcss.config.js +0 -6
- package/vite-mf/webpack/src/App.tsx +0 -16
- package/vite-mf/webpack/src/Image.tsx +0 -18
- package/vite-mf/webpack/src/assets/webpack-logo.png +0 -0
- package/vite-mf/webpack/src/global.d.ts +0 -4
- package/vite-mf/webpack/src/index.html +0 -12
- package/vite-mf/webpack/src/index.scss +0 -7
- package/vite-mf/webpack/src/index.ts +0 -1
- package/vite-mf/webpack/tailwind.config.js +0 -11
- package/vite-mf/webpack/tsconfig.json +0 -29
- package/vite-mf/webpack/webpack.config.js +0 -91
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES6", // Specify ECMAScript target version
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"lib": ["dom", "dom.iterable", "esnext"], // List of library files to be included in the compilation
|
|
6
|
-
"allowJs": true, // Allow JavaScript files to be compiled
|
|
7
|
-
"skipLibCheck": true, // Skip type checking of all declaration files
|
|
8
|
-
"esModuleInterop": true, // Disables namespace imports (import * as fs from "fs") and enables CJS/AMD/UMD style imports (import fs from "fs")
|
|
9
|
-
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
|
|
10
|
-
"strict": true, // Enable all strict type checking options
|
|
11
|
-
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
|
|
12
|
-
"module": "esnext", // Specify module code generation
|
|
13
|
-
"moduleResolution": "node", // Resolve modules using Node.js style
|
|
14
|
-
"isolatedModules": true, // Unconditionally emit imports for unresolved files
|
|
15
|
-
"resolveJsonModule": true, // Include modules imported with .json extension
|
|
16
|
-
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
|
|
17
|
-
"jsx": "react", // Support JSX in .tsx files
|
|
18
|
-
"sourceMap": true, // Generate corrresponding .map file
|
|
19
|
-
"declaration": true, // Generate corresponding .d.ts file
|
|
20
|
-
"noUnusedLocals": true, // Report errors on unused locals
|
|
21
|
-
"noUnusedParameters": true, // Report errors on unused parameters
|
|
22
|
-
"incremental": true, // Enable incremental compilation by reading/writing information from prior compilations to a file on disk
|
|
23
|
-
"noFallthroughCasesInSwitch": true // Report errors for fallthrough cases in switch statement
|
|
24
|
-
},
|
|
25
|
-
"include": [
|
|
26
|
-
"src/**/*" // *** The files TypeScript should type check ***
|
|
27
|
-
],
|
|
28
|
-
"exclude": ["node_modules", "build", "dist"]
|
|
29
|
-
}
|
package/vite-mf/webpack/.babelrc
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
["@babel/preset-env"],
|
|
4
|
-
"@babel/preset-typescript",
|
|
5
|
-
[
|
|
6
|
-
"@babel/preset-react",
|
|
7
|
-
{
|
|
8
|
-
"runtime": "automatic" // Enables the new JSX transform in React 17+
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
],
|
|
12
|
-
"plugins": ["@babel/plugin-transform-runtime", "@babel/plugin-syntax-dynamic-import"]
|
|
13
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const printCompilationMessage = (status, port) => {
|
|
2
|
-
let messageColor, messageType, browserMessage;
|
|
3
|
-
|
|
4
|
-
switch (status) {
|
|
5
|
-
case 'success':
|
|
6
|
-
messageColor = '\x1b[32m';
|
|
7
|
-
messageType = 'Compiled successfully!';
|
|
8
|
-
browserMessage = 'You can now view';
|
|
9
|
-
break;
|
|
10
|
-
case 'failure':
|
|
11
|
-
messageColor = '\x1b[31m';
|
|
12
|
-
messageType = 'Compilation Failed!';
|
|
13
|
-
browserMessage = "You can't now view";
|
|
14
|
-
break;
|
|
15
|
-
case 'compiling':
|
|
16
|
-
messageColor = '\x1b[94m';
|
|
17
|
-
messageType = 'Compiling...';
|
|
18
|
-
browserMessage = 'Compiling the';
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
console.log(`\n\n
|
|
23
|
-
${messageColor}${messageType}\x1b[0m\n
|
|
24
|
-
${browserMessage} \x1b[1mRemote\x1b[0m in the browser.
|
|
25
|
-
${messageColor}${messageType}\x1b[0m\n
|
|
26
|
-
\x1b[1mLocal\x1b[0m: http://localhost:\x1b[1m${port}\x1b[0m
|
|
27
|
-
\x1b[1mLocal\x1b[0m: http://localhost:\x1b[1m${port}\x1b[0m\n\n
|
|
28
|
-
`);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
module.exports = printCompilationMessage;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vite_webpack",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"build": "webpack --mode production",
|
|
6
|
-
"build:dev": "webpack --mode development",
|
|
7
|
-
"build:start": "cd dist && PORT=8080 npx serve",
|
|
8
|
-
"start": "webpack serve --mode development",
|
|
9
|
-
"start:live": "webpack serve --mode development --live-reload --hot"
|
|
10
|
-
},
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"author": {
|
|
13
|
-
"name": "Jack Herrington",
|
|
14
|
-
"email": "jherr@pobox.com"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@babel/core": "^7.15.8",
|
|
18
|
-
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
19
|
-
"@babel/preset-env": "^7.15.8",
|
|
20
|
-
"@babel/preset-react": "^7.14.5",
|
|
21
|
-
"@babel/preset-typescript": "^7.10.4",
|
|
22
|
-
"@babel/runtime": "7.25.6",
|
|
23
|
-
"@module-federation/enhanced": "0.6.3",
|
|
24
|
-
"@types/react": "^18.2.0",
|
|
25
|
-
"@types/react-dom": "^18.2.0",
|
|
26
|
-
"autoprefixer": "^10.1.0",
|
|
27
|
-
"babel-loader": "^8.2.2",
|
|
28
|
-
"css-loader": "^6.3.0",
|
|
29
|
-
"dotenv-webpack": "^8.0.1",
|
|
30
|
-
"html-webpack-plugin": "^5.3.2",
|
|
31
|
-
"postcss": "^8.2.1",
|
|
32
|
-
"postcss-loader": "^4.1.0",
|
|
33
|
-
"style-loader": "^3.3.0",
|
|
34
|
-
"tailwindcss": "^3.4.1",
|
|
35
|
-
"typescript": "^4.5.2",
|
|
36
|
-
"webpack": "^5.57.1",
|
|
37
|
-
"webpack-cli": "^4.10.0",
|
|
38
|
-
"webpack-dev-server": "^4.3.1",
|
|
39
|
-
"zephyr-webpack-plugin": "^0.0.30"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
43
|
-
"react": "^18.3.1",
|
|
44
|
-
"react-dom": "^18.3.1"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import WebpackImage from './Image';
|
|
4
|
-
import './index.scss';
|
|
5
|
-
|
|
6
|
-
const App = () => (
|
|
7
|
-
<div className="mt-10 text-3xl bg-black h-[80vh] mx-auto max-w-6xl">
|
|
8
|
-
<WebpackImage />
|
|
9
|
-
</div>
|
|
10
|
-
);
|
|
11
|
-
const rootElement = document.getElementById('app');
|
|
12
|
-
if (!rootElement) throw new Error('Failed to find the root element');
|
|
13
|
-
|
|
14
|
-
const root = ReactDOM.createRoot(rootElement as HTMLElement);
|
|
15
|
-
|
|
16
|
-
root.render(<App />);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import logo from './assets/webpack-logo.png';
|
|
4
|
-
|
|
5
|
-
const WebpackImage = () => {
|
|
6
|
-
const [count, setCount] = useState(0);
|
|
7
|
-
return (
|
|
8
|
-
<div>
|
|
9
|
-
<p className="text-white text-base">This is a component from Webpack.</p>{' '}
|
|
10
|
-
<button className="border rounded-md text-base text-white py-1 px-2" onClick={() => setCount(count + 1)}>
|
|
11
|
-
Webpack Button - Count: {count}
|
|
12
|
-
</button>
|
|
13
|
-
<img src={logo} />
|
|
14
|
-
</div>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default WebpackImage;
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import('./App');
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES6", // Specify ECMAScript target version
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"lib": ["dom", "dom.iterable", "esnext"], // List of library files to be included in the compilation
|
|
6
|
-
"allowJs": true, // Allow JavaScript files to be compiled
|
|
7
|
-
"skipLibCheck": true, // Skip type checking of all declaration files
|
|
8
|
-
"esModuleInterop": true, // Disables namespace imports (import * as fs from "fs") and enables CJS/AMD/UMD style imports (import fs from "fs")
|
|
9
|
-
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
|
|
10
|
-
"strict": true, // Enable all strict type checking options
|
|
11
|
-
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
|
|
12
|
-
"module": "esnext", // Specify module code generation
|
|
13
|
-
"moduleResolution": "node", // Resolve modules using Node.js style
|
|
14
|
-
"isolatedModules": true, // Unconditionally emit imports for unresolved files
|
|
15
|
-
"resolveJsonModule": true, // Include modules imported with .json extension
|
|
16
|
-
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
|
|
17
|
-
"jsx": "react", // Support JSX in .tsx files
|
|
18
|
-
"sourceMap": true, // Generate corrresponding .map file
|
|
19
|
-
"declaration": true, // Generate corresponding .d.ts file
|
|
20
|
-
"noUnusedLocals": true, // Report errors on unused locals
|
|
21
|
-
"noUnusedParameters": true, // Report errors on unused parameters
|
|
22
|
-
"incremental": true, // Enable incremental compilation by reading/writing information from prior compilations to a file on disk
|
|
23
|
-
"noFallthroughCasesInSwitch": true // Report errors for fallthrough cases in switch statement
|
|
24
|
-
},
|
|
25
|
-
"include": [
|
|
26
|
-
"src/**/*" // *** The files TypeScript should type check ***
|
|
27
|
-
],
|
|
28
|
-
"exclude": ["node_modules", "build", "dist"]
|
|
29
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
2
|
-
//const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const Dotenv = require('dotenv-webpack');
|
|
5
|
-
const { withZephyr } = require('zephyr-webpack-plugin');
|
|
6
|
-
const { ModuleFederationPlugin } = require('@module-federation/enhanced/webpack');
|
|
7
|
-
|
|
8
|
-
const deps = require('./package.json').dependencies;
|
|
9
|
-
|
|
10
|
-
const printCompilationMessage = require('./compilation.config.js');
|
|
11
|
-
|
|
12
|
-
module.exports = (_, argv) =>
|
|
13
|
-
withZephyr()({
|
|
14
|
-
output: {
|
|
15
|
-
publicPath: 'auto',
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
resolve: {
|
|
19
|
-
extensions: ['.tsx', '.ts', '.jsx', '.js', '.json'],
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
devServer: {
|
|
23
|
-
port: 8080,
|
|
24
|
-
historyApiFallback: true,
|
|
25
|
-
watchFiles: [path.resolve(__dirname, 'src')],
|
|
26
|
-
onListening: function (devServer) {
|
|
27
|
-
const port = devServer.server.address().port;
|
|
28
|
-
|
|
29
|
-
printCompilationMessage('compiling', port);
|
|
30
|
-
|
|
31
|
-
devServer.compiler.hooks.done.tap('OutputMessagePlugin', (stats) => {
|
|
32
|
-
setImmediate(() => {
|
|
33
|
-
if (stats.hasErrors()) {
|
|
34
|
-
printCompilationMessage('failure', port);
|
|
35
|
-
} else {
|
|
36
|
-
printCompilationMessage('success', port);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
module: {
|
|
44
|
-
rules: [
|
|
45
|
-
{
|
|
46
|
-
test: /\.(svg|png)$/,
|
|
47
|
-
type: 'asset',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
test: /\.m?js/,
|
|
51
|
-
type: 'javascript/auto',
|
|
52
|
-
resolve: {
|
|
53
|
-
fullySpecified: false,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
test: /\.(css|s[ac]ss)$/i,
|
|
58
|
-
use: ['style-loader', 'css-loader', 'postcss-loader'],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
test: /\.(ts|tsx|js|jsx)$/,
|
|
62
|
-
exclude: /node_modules/,
|
|
63
|
-
use: {
|
|
64
|
-
loader: 'babel-loader',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
plugins: [
|
|
71
|
-
new ModuleFederationPlugin({
|
|
72
|
-
name: 'vite_webpack',
|
|
73
|
-
filename: 'remoteEntry.js',
|
|
74
|
-
exposes: {
|
|
75
|
-
'./Image': './src/Image',
|
|
76
|
-
},
|
|
77
|
-
shared: {
|
|
78
|
-
react: {
|
|
79
|
-
singleton: true,
|
|
80
|
-
},
|
|
81
|
-
'react-dom': {
|
|
82
|
-
singleton: true,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
new HtmlWebPackPlugin({
|
|
87
|
-
template: './src/index.html',
|
|
88
|
-
}),
|
|
89
|
-
new Dotenv(),
|
|
90
|
-
],
|
|
91
|
-
});
|