mirror of
https://github.com/3dmol/3Dmol.js.git
synced 2026-06-04 08:39:49 +09:00
Implement wireframe style for meshes. Also a number of changes to work with newer versions of devtools.
55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
/* eslint-disable no-undef*/
|
|
const path = require("path");
|
|
const webpack = require("webpack");
|
|
const pkg = require("./package.json");
|
|
const ESLintPlugin = require('eslint-webpack-plugin');
|
|
|
|
const banner = `${pkg.name} v${pkg.version}
|
|
${pkg.description}
|
|
Author: ${pkg.author}`;
|
|
|
|
module.exports = {
|
|
target: "web",
|
|
entry: {
|
|
'3Dmol': [
|
|
"./src/index.ts",
|
|
"./src/SurfaceWorker.js",
|
|
"./src/exporter.js"
|
|
],
|
|
'3Dmol.ui': [
|
|
"./src/ui/ui.js",
|
|
"./src/ui/state.js",
|
|
"./src/ui/icon.js",
|
|
"./src/ui/form.js",
|
|
"./src/ui/defaultValues.js"
|
|
]
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "build"),
|
|
library: '[name]',
|
|
libraryTarget: "umd",
|
|
globalObject: "this"
|
|
},
|
|
resolve: {
|
|
extensions: [".ts", ".tsx", ".js", ".json"],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{ test: /\.tsx?$/, loader: "ts-loader" },
|
|
{ test: /\.frag$/, loader: "raw-loader" },
|
|
{ test: /\.vert$/, loader: "raw-loader" }
|
|
],
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
MMTF: path.resolve(__dirname, "./src/vendor/mmtf.js"),
|
|
$: "jquery"
|
|
}),
|
|
new webpack.BannerPlugin({ banner }),
|
|
new ESLintPlugin({exclude: ['node_modules']})
|
|
],
|
|
stats: {
|
|
errorDetails: true,
|
|
}
|
|
};
|