Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit a8a630e

Browse files
committed
fix(webpack): fix webpack publicPath issue
1 parent 24b43e3 commit a8a630e

File tree

9 files changed

+1668
-7052
lines changed

9 files changed

+1668
-7052
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616

1717
# live2d-widget.js
1818

19-
[简体中文文档](./README.zh-CN.md)
20-
21-
<br>
22-
2319
Add the Sseexxyyy live2d to your webpages!
2420

21+
[TOC]
22+
2523
Demo: [TBD.](javascript:void(0);)
2624

2725
Online generator: [TBD.](javascript:void(0);)

src/cLive2DApp.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
import "./lib/live2d.core";
1+
/*import {
2+
UtSystem,
3+
UtDebug,
4+
LDTransform,
5+
LDGL,
6+
Live2D,
7+
Live2DModelWebGL,
8+
Live2DModelJS,
9+
Live2DMotion,
10+
MotionQueueManager,
11+
PhysicsHair,
12+
AMotion,
13+
PartsDataID,
14+
DrawDataID,
15+
BaseDataID,
16+
ParamID
17+
} from './lib/live2d.core';*/
18+
import './lib/live2d.min.js';
219
import { createCanvas, initCanvas } from "./lib/canvasManager";
320
import { device } from 'current-device';
421
import { L2DTargetPoint, L2DViewMatrix, L2DMatrix44 } from "./lib/Live2DFramework";

src/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @description The entry file
99
*/
1010

11+
'use strict';
1112

1213
import device from 'current-device';
1314
import config from './lib/configManager.js';
@@ -16,10 +17,15 @@ import config from './lib/configManager.js';
1617
* @param {Object} userConfig User's config
1718
*/
1819

20+
function getWebPackPublicPath(){
21+
let runtimePublicPath;
22+
__webpack_public_path__ = runtimePublicPath;
23+
}
24+
1925
export function init(userConfig){
2026
if (process.env.NODE_ENV === 'development') {
2127
console.log('Hey that, you are now in DEV.');
22-
}
28+
}/*
2329
try{
2430
config.checkConfig(userConfig);
2531
}catch(err){
@@ -28,7 +34,7 @@ export function init(userConfig){
2834
config.applyConfig(userConfig);
2935
if((!config.options.mobile.show)&&(device.mobile())){
3036
return;
31-
}
37+
}*/
3238
import(/* webpackMode: "lazy" */ './cLive2DApp').then(_ => {
3339
_.default();
3440
}).catch(err => {

src/lib/L2DMatrix44Study.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)