Skip to content

Commit

Permalink
Revert "Convert to module to make it easier to build/test/validate/im…
Browse files Browse the repository at this point in the history
…port."

This reverts commit b3c325e.
  • Loading branch information
wparad committed Jan 25, 2024
1 parent 604361d commit 680faf7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 44 deletions.
28 changes: 0 additions & 28 deletions .vscode/launch.json

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/extensions
const unitConfig = require('./jest.unit.config.cjs');
const unitConfig = require('./jest.unit.config');

module.exports = {
...unitConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const path = require('path');
const webpack = require('webpack');
const { StatsWriterPlugin } = require('webpack-stats-plugin');
const { DuplicatesPlugin } = require('inspectpack/plugin');
const { WebpackBundleSizeAnalyzerPlugin } = require('webpack-bundle-size-analyzer');
const TerserPlugin = require('terser-webpack-plugin');
const { cloneDeep } = require('lodash');
import path from 'path';
import webpack from 'webpack';
import { StatsWriterPlugin } from 'webpack-stats-plugin';
import { DuplicatesPlugin } from 'inspectpack/plugin';
import { WebpackBundleSizeAnalyzerPlugin } from 'webpack-bundle-size-analyzer';
import TerserPlugin from 'terser-webpack-plugin';
import { cloneDeep } from 'lodash';

const babelModule = {
const module = {
rules: [
{
test: /\.js$/,
Expand Down Expand Up @@ -44,10 +44,10 @@ const browser = {
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
buffer: require.resolve('buffer'),
path: require.resolve('path-browserify'),
path: require.resolve('path-browserify')
},
},
module: babelModule,
module,
plugins: [
new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] }),
new webpack.ProvidePlugin({ process: 'process/browser' }),
Expand Down Expand Up @@ -104,4 +104,4 @@ browserMin.optimization = {
],
};

module.exports = [browser, browserMin];
export default [browser, browserMin];
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "lib/commonjs.js",
"module": "es/index.js",
"jsnext:main": "es/index.js",
"type": "module",
"unpkg": "dist/openapi-resolver.browser.min.js",
"repository": "[email protected]:Authress-Engineering/openapi-resolver.js.git",
"contributors": [
Expand All @@ -27,11 +26,11 @@
"scripts": {
"prepublishOnly": "npm run clean && npm run lint && npm run test && npm run build",
"build": "run-s build:umd:browser build:commonjs build:es",
"build:umd:browser": "cross-env BABEL_ENV=browser webpack --progress --config config/webpack/browser.config.babel.cjs",
"build:umd:browser": "cross-env BABEL_ENV=browser webpack --progress --config config/webpack/browser.config.babel.js",
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
"lint": "eslint src/ test/",
"test": "cross-env BABEL_ENV=commonjs jest --runInBand --config ./config/jest/jest.unit.coverage.config.cjs",
"test": "cross-env BABEL_ENV=commonjs jest --runInBand --config ./config/jest/jest.unit.coverage.config.js",
"test:unit": "cross-env BABEL_ENV=commonjs jest --runInBand --config ./config/jest/jest.unit.config.js",
"test:unit:watch": "cross-env BABEL_ENV=commonjs jest --runInBand --watch --config ./config/jest/jest.unit.config.js",
"deps:license": "license-checker --production --csv --out $npm_package_config_deps_check_dir/licenses.csv && license-checker --development --csv --out $npm_package_config_deps_check_dir/licenses-dev.csv",
Expand Down Expand Up @@ -80,7 +79,6 @@
"lodash": "^4.17.21",
"lodash-webpack-plugin": "=0.11.6",
"node-fetch": "^3.3.0",
"nodemon": "^3.0.3",
"npm-run-all": "^4.1.5",
"path-browserify": "^1.0.1",
"prettier": "^2.3.0",
Expand Down

0 comments on commit 680faf7

Please sign in to comment.