mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-15 12:47:56 +08:00
* toast test * modify webpack build to allow for global CSS; use CSS modules to scope component styling * remove heatmap * add label to index resets * swapping out buttons for blueprint * adding constants to globals * swapping out blueprint buttons * title position, sidebar improvements * sidebar styles * adding toasts for validation errors * zebra section trial * integrating blueprint, switching buttons over, breaking out scatter * clean up console
83 lines
1.9 KiB
JavaScript
83 lines
1.9 KiB
JavaScript
// jshint esversion: 6
|
|
const path = require("path");
|
|
const webpack = require("webpack");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
const src = path.resolve("src");
|
|
const nodeModules = path.resolve("node_modules");
|
|
|
|
const babelOptions = require("../babel/babel.dev");
|
|
|
|
module.exports = {
|
|
mode: "development",
|
|
devtool: "eval",
|
|
entry: ["./src/index"],
|
|
output: {
|
|
path: path.resolve("build"),
|
|
pathinfo: true,
|
|
filename: "static/js/bundle.js",
|
|
publicPath: "/"
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
include: src,
|
|
loader: "babel-loader",
|
|
options: babelOptions
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
include: src,
|
|
exclude: [path.resolve(src, "index.css")],
|
|
loader: [
|
|
{
|
|
loader: "style-loader"
|
|
},
|
|
{
|
|
loader: "css-loader",
|
|
options: {
|
|
modules: true,
|
|
localIdentName: "[name]__[local]___[hash:base64:5]"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
test: /index\.css$/,
|
|
include: [path.resolve(src, "index.css")],
|
|
loader: [
|
|
{
|
|
loader: "style-loader"
|
|
},
|
|
{
|
|
loader: "css-loader"
|
|
}
|
|
]
|
|
},
|
|
|
|
{ test: /\.json$/, include: [src, nodeModules], loader: "json-loader" },
|
|
{
|
|
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/,
|
|
include: [src, nodeModules],
|
|
loader: "file-loader",
|
|
query: { name: "static/media/[name].[ext]" }
|
|
},
|
|
{
|
|
test: /\.(mp4|webm)(\?.*)?$/,
|
|
include: [src, nodeModules],
|
|
loader: "url-loader",
|
|
query: { limit: 10000, name: "static/media/[name].[ext]" }
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
inject: true,
|
|
template: path.resolve("index.html"),
|
|
favicon: path.resolve("favicon.png")
|
|
}),
|
|
new webpack.NoEmitOnErrorsPlugin()
|
|
]
|
|
};
|