8000 Jan kaul esmodule by risenW · Pull Request #415 · javascriptdata/danfojs · GitHub
[go: up one dir, main page]

Skip to content

Jan kaul esmodule #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/danfojs-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.",
"main": "dist/danfojs-browser/src/index.js",
"types": "dist/danfojs-browser/src/index.d.ts",
"module": "lib/bundle-esm.js",
"directories": {
"test": "tests"
},
Expand Down Expand Up @@ -99,8 +100,8 @@
"source-map-loader": "^3.0.0",
"ts-loader": "^9.2.6",
"typescript": "^4.4.2",
"webpack": "5.21.2",
"webpack-cli": "4.5.0",
"webpack": "5.69.1",
"webpack-cli": "4.9.2",
"yarn": "^1.22.10"
},
"nyc": {
Expand All @@ -110,4 +111,4 @@
]
},
"sideEffects": false
}
}
3 changes: 2 additions & 1 deletion src/danfojs-browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"moduleResolution": "node",
"lib": ["es6", "dom"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"outDir": "./dist", /* Redirect output structure to the directory. */
Expand Down
11 changes: 6 additions & 5 deletions src/danfojs-browser/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require("path");
const webpack = require("webpack");

const createConfig = (target) => {
const createConfig = ({ target, filename = "bundle.js", library = "dfd", experiments = undefined }) => {
return {
mode: "production",
devtool: "source-map",
Expand All @@ -13,8 +13,8 @@ const createConfig = (target) => {
target: target,
output: {
path: path.resolve(__dirname, "lib"),
filename: `bundle.js`,
library: "dfd"
filename: filename,
library: library
},
plugins: [
// Work around for Buffer is undefined:
Expand Down Expand Up @@ -51,8 +51,9 @@ const createConfig = (target) => {
"net": false,
"tls": false
}
}
},
experiments: experiments
};
};

module.exports = [ createConfig("web") ];
module.exports = [ createConfig({ target: "web" }), createConfig({ target: "web", filename: "bundle-esm.js", library: { type: "module" }, experiments: { outputModule: true } }) ];
Loading
0