This commit is contained in:
ochafik 2023-03-25 19:34:07 +00:00
commit b381f38eef
3 changed files with 7 additions and 9 deletions

View file

@ -32,6 +32,10 @@ make public
npm start npm start
# http://localhost:4000/ # http://localhost:4000/
``` ```
Local prod (test both the different inlining and serving under a prefix):
```bash
make public make public
npm run start:prod npm run start:prod
# http://localhost:3000/dist/ # http://localhost:3000/dist/

View file

@ -18,8 +18,7 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-stl-viewer": "^2.2.5", "react-stl-viewer": "^2.2.5",
"react-widgets": "^5.8.4", "react-widgets": "^5.8.4"
"web-vitals": "^2.1.4"
}, },
"scripts": { "scripts": {
"start": "concurrently 'npx webpack serve --mode=development' 'NODE_ENV=development npx rollup --config openscad-worker.rollup.config.js --watch'", "start": "concurrently 'npx webpack serve --mode=development' 'NODE_ENV=development npx rollup --config openscad-worker.rollup.config.js --watch'",
@ -47,6 +46,7 @@
"devDependencies": { "devDependencies": {
"@rollup/plugin-html": "^1.0.2", "@rollup/plugin-html": "^1.0.2",
"@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-typescript": "^11.0.0", "@rollup/plugin-typescript": "^11.0.0",
"@types/filesystem": "^0.0.32", "@types/filesystem": "^0.0.32",
"@types/node": "^18.15.6", "@types/node": "^18.15.6",

View file

@ -3,14 +3,13 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import {App} from './App'; import {App} from './App';
import reportWebVitals from './reportWebVitals';
import { createEditorFS } from './filesystem'; import { createEditorFS } from './filesystem';
import { registerOpenSCADLanguage } from './language/openscad-register-language'; import { registerOpenSCADLanguage } from './language/openscad-register-language';
import { zipArchives } from './zip-archives'; import { zipArchives } from './zip-archives';
import {readStateFromFragment} from './fragment-state' import {readStateFromFragment} from './fragment-state'
import { State } from './app-state'; import { State } from './app-state';
import './index.css';
import defaultScad from './default-scad' import defaultScad from './default-scad'
import './index.css';
import debug from 'debug'; import debug from 'debug';
const log = debug('app:log'); const log = debug('app:log');
@ -49,11 +48,6 @@ if (process.env.NODE_ENV !== 'production') {
<App initialState={initialState} /> <App initialState={initialState} />
</React.StrictMode> </React.StrictMode>
); );
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
})(); })();