1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +00:00

Resolve @/jsx-runtime in webpack

TypeScript compiler on its own will only inject this import, but not
resolve it. The bundler is supposed to resolve the import, so just do
that.
This commit is contained in:
Даниїл Григор'єв 2024-07-11 12:52:03 +03:00
parent 26e854f983
commit ee11931c9f
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
2 changed files with 3 additions and 1 deletions

View File

@ -88,6 +88,7 @@ export default {
alias: {
"global-compression": resolve("../src/js/core/lzstring.js"),
"root": resolve("../src/js/"),
"@/jsx-runtime": resolve("../src/js/jsx-runtime.ts"),
},
fullySpecified: false,
extensions: [".ts", ".js", ".tsx", ".jsx"],

View File

@ -1,9 +1,9 @@
import { resolve } from "path/posix";
import TerserPlugin from "terser-webpack-plugin";
import webpack from "webpack";
const { DefinePlugin, IgnorePlugin } = webpack;
import DeadCodePlugin from "webpack-deadcode-plugin";
import { getAllResourceImages, getRevision, getVersion } from "./buildutils.js";
const { DefinePlugin, IgnorePlugin } = webpack;
const globalDefs = {
"assert": "false && window.assert",
@ -97,6 +97,7 @@ export default {
alias: {
"global-compression": resolve("../src/js/core/lzstring.js"),
"root": resolve("../src/js/"),
"@/jsx-runtime": resolve("../src/js/jsx-runtime.ts"),
},
fullySpecified: false,
extensions: [".ts", ".js", ".tsx", ".jsx"],