Don't use webpack to transpile ts into js for frontend
This commit is contained in:
parent
56b876c63a
commit
b7f5ca9da6
@ -1,9 +1,8 @@
|
||||
{
|
||||
"bundles": {
|
||||
"index": "ts/index.ts",
|
||||
"settings": "ts/settings.ts",
|
||||
"service-settings": "ts/service-settings.ts",
|
||||
"files": "ts/files.ts",
|
||||
"layout": "sass/layout.scss",
|
||||
"files": "ts/files.ts"
|
||||
"index": "sass/index.scss",
|
||||
"service-settings": "sass/service-settings.scss"
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ import {
|
||||
UpdateTargetUrlEvent,
|
||||
WebContents
|
||||
} from "electron";
|
||||
import "../sass/index.scss";
|
||||
|
||||
const {
|
||||
Menu,
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {ipcRenderer, remote} from "electron";
|
||||
import "../sass/service-settings.scss";
|
||||
|
||||
let isImageCheckbox: HTMLInputElement | null;
|
||||
let builtInIconSearchField: HTMLInputElement | null;
|
||||
|
@ -11,10 +11,10 @@
|
||||
"main": "build/main.js",
|
||||
"scripts": {
|
||||
"clean": "(! test -d build || rm -r build) && (! test -d resources || rm -r resources)",
|
||||
"compile": "yarn clean && tsc -p tsconfig.backend.json && webpack --mode production",
|
||||
"compile-dev": "yarn clean && tsc -p tsconfig.backend.json && webpack --mode development",
|
||||
"compile": "yarn clean && tsc -p tsconfig.backend.json && tsc -p tsconfig.frontend.json && webpack --mode production",
|
||||
"compile-dev": "yarn clean && tsc -p tsconfig.backend.json && tsc -p tsconfig.frontend.json && webpack --mode development",
|
||||
"start": "yarn compile && electron .",
|
||||
"dev": "yarn compile-dev && concurrently -k -n \"Electron,Webpack\" -p \"[{name}]\" -c \"green,yellow\" \"electron . --dev\" \"webpack --mode development --watch\"",
|
||||
"dev": "yarn compile-dev && concurrently -k -n \"Electron,Webpack,TSC-Frontend\" -p \"[{name}]\" -c \"green,yellow\" \"electron . --dev\" \"webpack --mode development --watch\" \"tsc -p tsconfig.frontend.json --watch\"",
|
||||
"build": "yarn compile && electron-builder -wl",
|
||||
"release": "yarn compile && GH_TOKEN=$(cat GH_TOKEN) electron-builder -wlp always"
|
||||
},
|
||||
|
@ -14,7 +14,7 @@ for (const b in userConfig.bundles) {
|
||||
const config = {
|
||||
entry: userConfig.bundles,
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'resources/js'),
|
||||
path: path.resolve(__dirname, 'resources/useless-js'), // Temporary until webpack stops emitting js for css files
|
||||
filename: '[name].js'
|
||||
},
|
||||
devtool: dev ? 'eval-source-map' : undefined,
|
||||
@ -69,8 +69,13 @@ const config = {
|
||||
},
|
||||
{
|
||||
test: /\.ts$/i,
|
||||
use: 'ts-loader',
|
||||
exclude: '/node_modules/',
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
configFile: 'tsconfig.frontend.json',
|
||||
}
|
||||
},
|
||||
exclude: '/node_modules/'
|
||||
},
|
||||
{
|
||||
test: /\.html$/i,
|
||||
|
Loading…
Reference in New Issue
Block a user