i *think* i got babel to work 👀
This commit is contained in:
		
							parent
							
								
									76aa016ef6
								
							
						
					
					
						commit
						5f7779f99b
					
				
							
								
								
									
										26
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										26
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -805,6 +805,18 @@ | ||||
|         "@babel/helper-plugin-utils": "^7.10.1" | ||||
|       } | ||||
|     }, | ||||
|     "@babel/plugin-transform-runtime": { | ||||
|       "version": "7.10.3", | ||||
|       "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.10.3.tgz", | ||||
|       "integrity": "sha512-b5OzMD1Hi8BBzgQdRHyVVaYrk9zG0wset1it2o3BgonkPadXfOv0aXRqd7864DeOIu3FGKP/h6lr15FE5mahVw==", | ||||
|       "dev": true, | ||||
|       "requires": { | ||||
|         "@babel/helper-module-imports": "^7.10.3", | ||||
|         "@babel/helper-plugin-utils": "^7.10.3", | ||||
|         "resolve": "^1.8.1", | ||||
|         "semver": "^5.5.1" | ||||
|       } | ||||
|     }, | ||||
|     "@babel/plugin-transform-shorthand-properties": { | ||||
|       "version": "7.10.1", | ||||
|       "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz", | ||||
| @ -871,6 +883,15 @@ | ||||
|         "@babel/helper-plugin-utils": "^7.10.1" | ||||
|       } | ||||
|     }, | ||||
|     "@babel/polyfill": { | ||||
|       "version": "7.10.1", | ||||
|       "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.10.1.tgz", | ||||
|       "integrity": "sha512-TviueJ4PBW5p48ra8IMtLXVkDucrlOZAIZ+EXqS3Ot4eukHbWiqcn7DcqpA1k5PcKtmJ4Xl9xwdv6yQvvcA+3g==", | ||||
|       "requires": { | ||||
|         "core-js": "^2.6.5", | ||||
|         "regenerator-runtime": "^0.13.4" | ||||
|       } | ||||
|     }, | ||||
|     "@babel/preset-env": { | ||||
|       "version": "7.10.3", | ||||
|       "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.3.tgz", | ||||
| @ -2264,6 +2285,11 @@ | ||||
|       "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", | ||||
|       "dev": true | ||||
|     }, | ||||
|     "core-js": { | ||||
|       "version": "2.6.11", | ||||
|       "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", | ||||
|       "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" | ||||
|     }, | ||||
|     "core-js-compat": { | ||||
|       "version": "3.6.5", | ||||
|       "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", | ||||
|  | ||||
| @ -12,6 +12,7 @@ | ||||
|     "test": "run-p --race dev cy:run" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@babel/polyfill": "^7.10.1", | ||||
|     "@babel/runtime": "^7.10.3", | ||||
|     "bcrypt": "^4.0.1", | ||||
|     "body-parser": "^1.19.0", | ||||
| @ -35,6 +36,7 @@ | ||||
|     "@babel/core": "^7.10.3", | ||||
|     "@babel/plugin-proposal-object-rest-spread": "^7.10.3", | ||||
|     "@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||||
|     "@babel/plugin-transform-runtime": "^7.10.3", | ||||
|     "@babel/preset-env": "^7.10.3", | ||||
|     "babel-loader": "^8.1.0", | ||||
|     "npm-run-all": "^4.1.5", | ||||
|  | ||||
							
								
								
									
										2
									
								
								static/a/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								static/a/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| * | ||||
| !.gitignore | ||||
| @ -1,4 +1,5 @@ | ||||
| const webpack = require('webpack'); | ||||
| const TerserPlugin = require('terser-webpack-plugin'); | ||||
| const path = require('path'); | ||||
| const config = require('sapper/config/webpack.js'); | ||||
| const pkg = require('./package.json'); | ||||
| @ -19,6 +20,28 @@ module.exports = { | ||||
| 		resolve: { alias, extensions, mainFields }, | ||||
| 		module: { | ||||
| 			rules: [ | ||||
|                 { | ||||
|                     test: /\.(js|mjs|html|svelte)$/, | ||||
|                     exclude: /(node_modules\/@babel)/, | ||||
|                     use: { | ||||
|                         loader: 'babel-loader', | ||||
|                         options: { | ||||
|                             presets: [ | ||||
|                                 ['@babel/preset-env', { | ||||
|                                     targets: '> 0.25%, ie >= 6, not dead' | ||||
|                                 }] | ||||
|                             ], | ||||
|                             plugins: [ | ||||
|                                 '@babel/plugin-syntax-dynamic-import', | ||||
| 					            '@babel/plugin-proposal-object-rest-spread', | ||||
| 					            ['@babel/plugin-transform-runtime', { | ||||
|                                     regenerator: true | ||||
|                                 }], | ||||
|                             ], | ||||
|                             sourceType: 'unambiguous' | ||||
|                         } | ||||
|                     } | ||||
|                 }, | ||||
| 				{ | ||||
| 					test: /\.(svelte|html)$/, | ||||
| 					use: { | ||||
| @ -30,7 +53,7 @@ module.exports = { | ||||
|                             onwarn | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
|                 }, | ||||
| 			] | ||||
| 		}, | ||||
| 		mode, | ||||
| @ -43,6 +66,10 @@ module.exports = { | ||||
| 			}), | ||||
| 		].filter(Boolean), | ||||
|         devtool: dev && 'inline-source-map', | ||||
|         optimization: { | ||||
|             minimize: true, | ||||
|             minimizer: [new TerserPlugin()], | ||||
|         }, | ||||
| 	}, | ||||
| 
 | ||||
| 	server: { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user