Cleaned up template.html and styles.css and webpack config

This commit is contained in:
Lucas Dower 2023-09-14 00:47:32 +01:00
parent f533f84fc4
commit fbbc57ad52
6 changed files with 240 additions and 298 deletions

515
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -64,7 +64,6 @@
"prompt": "^1.2.1", "prompt": "^1.2.1",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"sharp": "^0.31.3", "sharp": "^0.31.3",
"style-loader": "^3.3.1",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"ts-loader": "^9.4.2", "ts-loader": "^9.4.2",
"ts-node": "^10.1.0", "ts-node": "^10.1.0",
@ -81,6 +80,7 @@
"dependencies": { "dependencies": {
"@loaders.gl/core": "^3.3.1", "@loaders.gl/core": "^3.3.1",
"@loaders.gl/gltf": "^3.3.1", "@loaders.gl/gltf": "^3.3.1",
"copy-webpack-plugin": "^11.0.0",
"split.js": "^1.6.5" "split.js": "^1.6.5"
} }
} }

View File

@ -16,6 +16,8 @@
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" content="https://objtoschematic.com/" /> <meta property="og:url" content="https://objtoschematic.com/" />
<meta property="og:image" content="https://i.imgur.com/TwdIpyb.png" /> <meta property="og:image" content="https://i.imgur.com/TwdIpyb.png" />
<link rel="stylesheet" href="styles.css">
</head> </head>
<body> <body>
<div class="content"> <div class="content">

View File

@ -1,4 +1,3 @@
import '../../styles.css';
import ATLAS_VANILLA from '../../res/atlases/vanilla.atlas'; import ATLAS_VANILLA from '../../res/atlases/vanilla.atlas';
import { AppAnalytics } from './analytics'; import { AppAnalytics } from './analytics';

View File

@ -1,29 +1,27 @@
const path = require('path'); const path = require('path');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = { module.exports = {
entry: './src/editor/main.ts', entry: './src/editor/main.ts',
plugins: [ plugins: [
new NodePolyfillPlugin(), new NodePolyfillPlugin(),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: './template.html', template: 'public/index.html',
favicon: './res/static/icon.ico', favicon: './res/static/icon.ico',
}), }),
new CopyWebpackPlugin({
patterns: [
{ from: "public/styles.css", to: "." }
],
}),
], ],
module: { module: {
rules: [ rules: [
{ {
test: /\.worker.ts$/, test: /\.worker.ts$/,
use: [ loader: 'worker-loader',
'worker-loader',
'ts-loader',
],
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
exclude: /node_modules/,
}, },
{ {
test: /\.vs|fs|atlas$/, test: /\.vs|fs|atlas$/,