-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
const path = require('path');const webpack = require('webpack');const ExtractTextPlugin = require('extract-text-webpack-plugin');const merge = require('webpack-merge');const treeShakableModules = [ '@angular/animations', '@angular/common', '@angular/compiler', '@angular/core', '@angular/forms', '@angular/http', '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', 'zone.js',];const nonTreeShakableModules = [ 'bootstrap', 'core-js/client/shim', 'web-animations-js', 'event-source-polyfill', 'jquery', '@swimlane/ngx-datatable/release/assets/icons.css', 'ng2-toasty', 'ng2-toasty/bundles/style-bootstrap.css', 'ng2-charts', 'ngx-bootstrap/modal', 'ngx-bootstrap/tooltip', 'ngx-bootstrap/popover', 'ngx-bootstrap/dropdown', 'ngx-bootstrap/carousel', 'bootstrap-vertical-tabs/bootstrap.vertical-tabs.css', 'bootstrap-toggle/css/bootstrap-toggle.css', 'bootstrap-toggle/js/bootstrap-toggle.js', 'bootstrap-select/dist/css/bootstrap-select.css', 'bootstrap-select/dist/js/bootstrap-select.js', 'bootstrap-datepicker/dist/css/bootstrap-datepicker3.css', 'font-awesome/css/font-awesome.css'];const allModules = treeShakableModules.concat(nonTreeShakableModules);module.exports = (env) => { const extractCSS = new ExtractTextPlugin('vendor.css'); const isDevBuild = !(env && env.prod); const sharedConfig = { stats: { modules: false }, resolve: { extensions: ['.js'] }, module: { rules: [ { test: /\.(gif|png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } ] }, output: { publicPath: 'dist/', filename: '[name].js', library: '[name]\_[hash]' }, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 ] }; const clientBundleConfig = merge(sharedConfig, { entry: { // To keep development builds fast, include all vendor dependencies in the vendor bundle. // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. vendor: isDevBuild ? allModules : nonTreeShakableModules }, output: { path: path.join(__dirname, 'wwwroot', 'dist') }, module: { rules: [ { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } ] }, plugins: [ extractCSS, new webpack.DllPlugin({ path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), name: '[name]\_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); return [clientBundleConfig];}
const path = require('path');const webpack = require('webpack');const ExtractTextPlugin = require('extract-text-webpack-plugin');const merge = require('webpack-merge');const treeShakableModules = [ '@angular/animations', '@angular/common', '@angular/compiler', '@angular/core', '@angular/forms', '@angular/http', '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', 'zone.js',];const nonTreeShakableModules = [ 'bootstrap', 'core-js/client/shim', 'web-animations-js', 'event-source-polyfill', 'jquery', '@swimlane/ngx-datatable/release/assets/icons.css', 'ng2-toasty', 'ng2-toasty/bundles/style-bootstrap.css', 'ng2-charts', 'ngx-bootstrap/modal', 'ngx-bootstrap/tooltip', 'ngx-bootstrap/popover', 'ngx-bootstrap/dropdown', 'ngx-bootstrap/carousel', 'bootstrap-vertical-tabs/bootstrap.vertical-tabs.css', 'bootstrap-toggle/css/bootstrap-toggle.css', 'bootstrap-toggle/js/bootstrap-toggle.js', 'bootstrap-select/dist/css/bootstrap-select.css', 'bootstrap-select/dist/js/bootstrap-select.js', 'bootstrap-datepicker/dist/css/bootstrap-datepicker3.css', 'font-awesome/css/font-awesome.css'];const allModules = treeShakableModules.concat(nonTreeShakableModules);module.exports = (env) => { const extractCSS = new ExtractTextPlugin('vendor.css'); const isDevBuild = !(env && env.prod); const sharedConfig = { stats: { modules: false }, resolve: { extensions: ['.js'] }, module: { rules: [ { test: /\.(gif|png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } ] }, output: { publicPath: 'dist/', filename: '[name].js', library: '[name]\_[hash]' }, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 ] }; const clientBundleConfig = merge(sharedConfig, { entry: { // To keep development builds fast, include all vendor dependencies in the vendor bundle. // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. vendor: isDevBuild ? allModules : nonTreeShakableModules }, output: { path: path.join(__dirname, 'wwwroot', 'dist') }, module: { rules: [ { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } ] }, plugins: [ extractCSS, new webpack.DllPlugin({ path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), name: '[name]\_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); return [clientBundleConfig];}