Skip to content

Commit ea92305

Browse files
committed
Miscelaneous fixes for WP
1 parent 91cf735 commit ea92305

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"watch": "NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
6565
"build": "NODE_ENV=development ./node_modules/.bin/webpack --progress",
6666
"build:production": "NODE_ENV=production ./node_modules/.bin/webpack",
67-
"serve": "NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --hot-only",
67+
"serve": "NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot",
6868
"v:serve": "PUBLIC_PATH=http://pterodactyl.test:8080 yarn run serve",
6969
"compile:assets": "php artisan vue-i18n:generate & php artisan ziggy:generate resources/assets/scripts/helpers/ziggy.js"
7070
}

resources/assets/scripts/app.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ import router from './router';
1616
Vue.config.productionTip = false;
1717
require('./bootstrap');
1818

19-
// @ts-ignore
2019
window.events = new Vue();
21-
// @ts-ignore
2220
window.Ziggy = Ziggy;
2321

2422
Vue.use(Vuex);
2523
Vue.use(VueRouter);
2624
Vue.use(VeeValidate);
2725
Vue.use(VueI18n);
2826

29-
// $FlowFixMe: this is always going to be unhappy because we ignore the vendor dir.
3027
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
3128

3229
Vue.mixin({methods: {route}});
@@ -37,7 +34,6 @@ const i18n = new VueI18n({
3734
messages: {...Locales},
3835
});
3936

40-
// $FlowFixMe
4137
if (module.hot) {
4238
module.hot.accept();
4339
}

resources/assets/scripts/pterodactyl-shims.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {FlashInterface} from "./mixins/flash";
44
import {AxiosInstance} from "axios";
55
import {Vue as VueType} from "vue/types/vue";
66
import {ApplicationState} from "./store/types";
7+
// @ts-ignore
8+
import {Ziggy} from './helpers/ziggy';
79

810
declare global {
911
interface Window {
@@ -13,6 +15,7 @@ declare global {
1315
jQuery: any,
1416
axios: AxiosInstance,
1517
events: VueType,
18+
Ziggy: Ziggy,
1619
}
1720
}
1821

tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
"lib": [
88
"es2016",
99
"dom"
10-
]
10+
],
11+
"baseUrl": ".",
12+
"paths": {
13+
"@/*": [
14+
"./resources/assets/scripts/*"
15+
]
16+
}
1117
},
1218
"include": [
1319
"./resources/assets/scripts/**/*"

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const cssLoaders = [
106106
];
107107

108108
module.exports = {
109+
target: 'web',
109110
mode: process.env.NODE_ENV,
110111
devtool: isProduction ? false : 'inline-source-map',
111112
performance: {
@@ -201,7 +202,7 @@ module.exports = {
201202
},
202203
devServer: {
203204
contentBase: path.join(__dirname, 'public'),
204-
publicPath: '/assets/',
205+
publicPath: _.get(process.env, 'PUBLIC_PATH', '') + '/assets/',
205206
allowedHosts: [
206207
'.pterodactyl.test',
207208
],

0 commit comments

Comments
 (0)