2019-07-27 07:49:19 +08:00
|
|
|
const path = require("path");
|
|
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
2019-08-11 04:09:06 +08:00
|
|
|
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
2019-07-27 07:49:19 +08:00
|
|
|
const { ProvidePlugin } = require("webpack");
|
|
|
|
|
|
|
|
module.exports = {
|
2019-08-21 23:56:46 +08:00
|
|
|
entry: "./src/index.ts",
|
2019-07-27 07:49:19 +08:00
|
|
|
output: {
|
2019-08-11 04:09:06 +08:00
|
|
|
path: path.resolve(__dirname, "dist"),
|
2019-07-27 07:49:19 +08:00
|
|
|
},
|
|
|
|
resolve: {
|
2019-12-25 07:17:02 +08:00
|
|
|
extensions: [".js", ".ts"],
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.(gif|jpg|png|svg|ttf)$/,
|
|
|
|
loader: "file-loader",
|
|
|
|
},
|
2020-01-26 05:38:07 +08:00
|
|
|
{
|
|
|
|
test: /\.(vert|frag)$/,
|
|
|
|
loader: "raw-loader",
|
|
|
|
},
|
2019-12-25 07:17:02 +08:00
|
|
|
],
|
2019-07-27 07:49:19 +08:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
2019-08-11 04:09:06 +08:00
|
|
|
title: "Phantasmal World",
|
2019-07-27 07:49:19 +08:00
|
|
|
}),
|
|
|
|
new MonacoWebpackPlugin({
|
2019-08-11 04:09:06 +08:00
|
|
|
languages: [],
|
2019-07-27 07:49:19 +08:00
|
|
|
}),
|
|
|
|
new ProvidePlugin({
|
|
|
|
$: "jquery",
|
|
|
|
jQuery: "jquery",
|
2019-08-11 04:09:06 +08:00
|
|
|
}),
|
|
|
|
],
|
2019-07-27 07:49:19 +08:00
|
|
|
};
|