Skip to content

Commit 7dfb1fd

Browse files
authored
Merge pull request #21 from EndoHizumi/develop
Develop
2 parents 3b6a441 + 5b56435 commit 7dfb1fd

15 files changed

Lines changed: 1255 additions & 434 deletions

example/package-lock.json

Lines changed: 50 additions & 274 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"build": "rimraf dist && npx wtc ./src/scene/ ./src/js/ && webpack --mode production"
1111
},
1212
"dependencies": {
13+
"console-browserify": "^1.2.0",
1314
"html-webpack-plugin": "^5.6.0",
14-
"storejs": "^2.1.0",
15-
"webtalekit": "^0.2.6"
15+
"storejs": "^2.1.0"
1616
},
1717
"devDependencies": {
1818
"filemanager-webpack-plugin": "^8.0.0",

example/webpack.config.js

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
1-
const HtmlWebpackPlugin = require("html-webpack-plugin");
2-
const path = require("path");
3-
const FileManagerPlugin = require("filemanager-webpack-plugin");
1+
const HtmlWebpackPlugin = require('html-webpack-plugin')
2+
const path = require('path')
3+
const FileManagerPlugin = require('filemanager-webpack-plugin')
44

55
module.exports = {
6-
mode: "development",
7-
entry: "./src/index.js",
8-
devtool: "source-map",
6+
mode: 'development',
7+
entry: './src/index.js',
8+
devtool: 'source-map',
99
output: {
10-
publicPath: "/",
11-
filename: "bundle.js",
12-
path: path.resolve(__dirname, "dist"),
13-
chunkFilename: "src/js/[name].bundle.js",
10+
publicPath: '/',
11+
filename: 'bundle.js',
12+
path: path.resolve(__dirname, 'dist'),
13+
chunkFilename: 'src/js/[name].bundle.js',
1414
},
1515
resolve: {
16-
extensions: [".ts", ".js"],
16+
extensions: ['.ts', '.js'],
17+
fallback: {
18+
console: require.resolve('console-browserify'),
19+
util: false,
20+
assert: false,
21+
},
1722
},
1823
externals: {
19-
webtalekit: "commonjs webtalekit",
24+
webtalekit: 'commonjs webtalekit',
2025
},
2126
devServer: {
2227
static: {
23-
directory: path.join(__dirname, "dist"),
28+
directory: path.join(__dirname, 'dist'),
2429
},
2530
port: 8080,
2631
headers: {
27-
"Feature-Policy": "autoplay 'self'",
28-
"Access-Control-Allow-Origin": "*",
29-
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
30-
"Access-Control-Allow-Headers":
31-
"X-Requested-With, content-type, Authorization",
32+
'Feature-Policy': "autoplay 'self'",
33+
'Access-Control-Allow-Origin': '*',
34+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
35+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
3236
},
3337
},
3438
plugins: [
3539
new HtmlWebpackPlugin({
36-
template: "./src/template.html",
37-
filename: "index.html",
40+
template: './src/template.html',
41+
filename: 'index.html',
3842
}),
3943
new FileManagerPlugin({
4044
events: {
4145
onEnd: {
4246
copy: [
4347
{
44-
source: path.resolve(__dirname, "./src/resource"),
45-
destination: path.resolve(__dirname, "dist/src/resource"),
48+
source: path.resolve(__dirname, './src/resource'),
49+
destination: path.resolve(__dirname, 'dist/src/resource'),
4650
},
4751
{
48-
source: path.resolve(__dirname, "./src/screen"),
49-
destination: path.resolve(__dirname, "dist/src/screen"),
52+
source: path.resolve(__dirname, './src/screen'),
53+
destination: path.resolve(__dirname, 'dist/src/screen'),
5054
},
5155
],
5256
},
@@ -57,9 +61,9 @@ module.exports = {
5761
rules: [
5862
{
5963
test: /\\.ts$/,
60-
use: "ts-loader",
64+
use: 'ts-loader',
6165
exclude: /node_modules/,
6266
},
6367
],
6468
},
65-
};
69+
}

0 commit comments

Comments
 (0)