mirror of
https://github.com/heavyai/heavyai-charting.git
synced 2026-01-25 14:57:45 +00:00
* Upgrade babel + plugins, use es2020 preset, move contour js and transpile it * Reset js to master * Fix contours name in webpack config * Update contours w latest from master * Galdernit * Rebuild charting.js * Upgrade nyc * Require babel core in opts, not in config
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
const webpack = require("webpack");
|
|
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
|
const path = require('path')
|
|
|
|
module.exports = {
|
|
context: __dirname,
|
|
entry: {
|
|
"charting": "./index.js"
|
|
},
|
|
output: {
|
|
path: path.join(__dirname, "/dist"),
|
|
filename: "[name].js",
|
|
libraryTarget: "umd",
|
|
library: "charting"
|
|
},
|
|
externals: {
|
|
"d3": "d3",
|
|
"crossfilter": {
|
|
"commonjs": "crossfilter",
|
|
"commonjs2": "crossfilter",
|
|
"amd": "crossfilter",
|
|
}
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js?$/,
|
|
exclude: /node_modules/,
|
|
use: "babel-loader"
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ExtractTextPlugin.extract({
|
|
fallback: "style-loader",
|
|
use: "css-loader"
|
|
})
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
use: ExtractTextPlugin.extract({
|
|
fallback: "style-loader",
|
|
use: ["css-loader", "sass-loader"]
|
|
})
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
"process.env": {
|
|
NODE_ENV: JSON.stringify("production")
|
|
}
|
|
}),
|
|
new ExtractTextPlugin("charting.css"),
|
|
]
|
|
};
|