Skip to content

Commit

Permalink
testing axios with http
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Mar 12, 2022
1 parent 150b4eb commit 4d97303
Show file tree
Hide file tree
Showing 3 changed files with 6,520 additions and 2 deletions.
6,508 changes: 6,506 additions & 2 deletions dist/ARToolkitNFT.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions examples/node/example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const ar = require('../../dist/ARToolkitNFT.js');
const process = require('process')

console.log('This is a test importing ARToolkitNFT.js with Nodejs')
var basePath = process.cwd()
ar.ARControllerNFT.initWithDimensions(640, 480, basePath +'/examples/Data/camera_para.dat')
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require("path");
const webpack = require('webpack');

module.exports = {
entry: "./src/index.ts",
Expand All @@ -14,6 +15,12 @@ module.exports = {
// @see: https://github.com/webpack/webpack/issues/6522
globalObject: "typeof self !== 'undefined' ? self : this",
},
target: 'node',
plugins: [
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV) }
})
],
module: {
rules: [
{
Expand Down Expand Up @@ -43,6 +50,7 @@ module.exports = {
fallback: {
fs: false,
path: false,
process: false,
crypto: false,
},
},
Expand Down

0 comments on commit 4d97303

Please sign in to comment.