mirror of
https://github.com/filecoin-project/slate.git
synced 2024-09-11 22:07:08 +03:00
Fix Babel errors.
This commit is contained in:
parent
b460b8c4cb
commit
1c1095048c
@ -2,8 +2,6 @@
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
// (colin) this may not be needed
|
||||
const prepareRenderer = require('electron-next');
|
||||
|
||||
function bootServer() {
|
||||
const { fork } = require('child_process');
|
||||
|
16
index.js
16
index.js
@ -1,7 +1,17 @@
|
||||
const regeneratorRuntime = require('regenerator-runtime');
|
||||
require('electron-compile');
|
||||
require('@babel/register')({
|
||||
presets: [[require.resolve('@babel/preset-env')]],
|
||||
presets: [
|
||||
[require.resolve('@babel/preset-env')],
|
||||
[
|
||||
require.resolve('next/babel'),
|
||||
{
|
||||
'preset-env': {},
|
||||
'transform-runtime': {},
|
||||
'styled-jsx': {},
|
||||
'class-properties': {},
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [[require.resolve('@babel/plugin-transform-runtime')]],
|
||||
ignore: ['node_modules', '.next'],
|
||||
});
|
||||
|
||||
|
@ -26,8 +26,9 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/register": "^7.10.4",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@babel/register": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@emotion/babel-preset-css-prop": "^10.0.27",
|
||||
"@emotion/cache": "11.0.0-next.12",
|
||||
"@emotion/core": "^10.0.28",
|
||||
@ -61,6 +62,7 @@
|
||||
"ws": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-runtime": "^7.10.4",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@rollup/plugin-node-resolve": "^8.1.0",
|
||||
"electron": "^9.0.5",
|
||||
|
@ -27,7 +27,7 @@ const wsPort = process.env.WS_PORT || 2448;
|
||||
|
||||
const path = require('path');
|
||||
const app = next({
|
||||
dev: true,
|
||||
dev: false,
|
||||
dir: __dirname,
|
||||
quiet: false,
|
||||
});
|
||||
|
@ -1,24 +0,0 @@
|
||||
const path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
|
||||
module.exports = {
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
},
|
||||
entry: './index.js',
|
||||
target: 'node',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js)$/,
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
output: {
|
||||
libraryTarget: 'commonjs',
|
||||
path: path.resolve(__dirname, './nodedistribution'),
|
||||
filename: '[name].js',
|
||||
},
|
||||
externals: [nodeExternals()],
|
||||
};
|
Loading…
Reference in New Issue
Block a user