Skip to content

Hotfix/fix type aliases #221

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 2 commits into from
Feb 14, 2025
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
26 changes: 6 additions & 20 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
'formio.core.js': './src/index.ts',
'formio.modules.js': './src/modules/index.ts',
'formio.js': './src/sdk/index.ts',
'formio.utils.js': './src/utils/index.ts',
'formio.process.js': './src/process/index.ts',
'formio.core.js': './lib/index.js',
'formio.modules.js': './lib/modules/index.js',
'formio.js': './lib/sdk/index.js',
'formio.utils.js': './lib/utils/index.js',
'formio.process.js': './lib/process/index.js',
},
output: {
library: {
Expand All @@ -28,20 +28,6 @@ module.exports = {
}),
],
resolve: {
extensions: ['.ts', '.js'],
plugins: [
new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, '..', 'tsconfig.json'),
}),
],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /\.spec\.ts$/,
loader: 'ts-loader',
},
],
extensions: ['.js'],
},
};
9 changes: 4 additions & 5 deletions config/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const path = require('path');
const config = require('./webpack.config');
config.mode = 'production';
config.entry = {
'formio.core.min.js': './src/index.ts',
'formio.modules.min.js': './src/modules/index.ts',
'formio.min.js': './src/sdk/index.ts',
'formio.utils.min.js': './src/utils/index.ts',
'formio.core.min.js': './lib/index.js',
'formio.modules.min.js': './lib/modules/index.js',
'formio.min.js': './lib/sdk/index.js',
'formio.utils.min.js': './lib/utils/index.js',
};
module.exports = config;
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
},
"scripts": {
"test": "TEST=1 nyc --reporter=lcov --reporter=text --reporter=text-summary mocha -b -r ts-node/register -r tsconfig-paths/register -r mock-local-storage -r jsdom-global/register -t 0 'src/**/__tests__/*.test.ts'",
"lib": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",
"lib": "tsc --project tsconfig.json",
"alias": "tsc-alias -p tsconfig.json",
"lib:watch": "tsc -w & tsc-alias -w",
"replace": "node -r tsconfig-paths/register -r ts-node/register ./lib/base/array/ArrayComponent.js",
"test:debug": "mocha -r ts-node/register -r tsconfig-paths/register -r mock-local-storage -r jsdom-global/register --debug-brk --inspect '**/*.spec.ts'",
"docs": "./node_modules/typedoc/bin/typedoc --exclude '*.spec.ts' src/*.ts src/**/*.ts src/**/**/*.ts",
"build:dev": "npx webpack --config config/webpack.config.js",
"build:prod": "npx webpack --config config/webpack.prod.js",
"clean": "rm -rf lib && rm -rf dist && rm -rf docs",
"build": "yarn clean && gulp templates && yarn docs && yarn lib && yarn build:dev && yarn build:prod",
"build": "yarn clean && gulp templates && yarn docs && yarn lib && yarn alias && yarn build:dev && yarn build:prod",
"prepublish": "yarn lint && yarn format && yarn build && yarn test",
"show-coverage": "open coverage/lcov-report/index.html",
"lint": "eslint src",
Expand Down
Loading