6 Star 20 Fork 16

Gitee 极速下载/ccxt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/ccxt/ccxt
克隆/下载
webpack.config.js 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
Carlo Revelli 提交于 2023-05-30 03:02 . minor edit to webpack config file
import path from 'path';
import url from 'url';
import TerserPlugin from "terser-webpack-plugin";
const cwd = url.fileURLToPath (import.meta.url);
const outputDirectory = path.normalize (path.join (path.dirname (cwd), 'dist'))
export default {
entry : './ts/ccxt.ts',
output: {
path: outputDirectory,
filename: 'ccxt.browser.js',
library: {
type: 'self', // we are targeting the browser (including webworkers)
name: 'ccxt',
},
chunkFormat: 'array-push',
chunkLoading: 'jsonp',
},
cache: {
type: 'filesystem',
},
module: {
rules: [{
test: /\.ts$/,
use: 'ts-loader',
exclude: [ /node_modules/ ],
sideEffects: false,
}],
},
resolve: {
extensions: [ '.ts' ],
// this line is needed because we use import xxx.js in ccxt
extensionAlias: {
'.js': [ '.js', '.ts' ],
},
},
mode: 'production',
target: 'web',
optimization: {
minimize: false,
minimizer: [new TerserPlugin ({ extractComments: false })],
usedExports: true, // these two lines line turns on tree shaking
concatenateModules: false,
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/ccxt.git
[email protected]:mirrors/ccxt.git
mirrors
ccxt
ccxt
master

搜索帮助