把前端从CircuitVerse中拆了出来

This commit is contained in:
zhbaor 2022-01-23 17:33:42 +08:00
commit 5bf1284599
2182 changed files with 189323 additions and 0 deletions

41
webpack.config.js Normal file
View file

@ -0,0 +1,41 @@
const path = require("path");
const webpack = require("webpack");
module.exports = {
mode: "development",
entry: "./simulator.js",
output: {
filename: "simulator.js",
path: path.resolve(__dirname, "public", "packs")
},
externals: {
jquery: "jQuery"
},
module: {
rules: [
{
test: /\.s?css$/i,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader",
options: {
importLoaders: 1
}
},
{
loader: "postcss-loader"
}
]
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
]
};