-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 4fd70ce.
- Loading branch information
1 parent
3510230
commit 47cecb8
Showing
119 changed files
with
13,378 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/env", "@babel/preset-react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.wrangler/ | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
#IDE | ||
.idea | ||
|
||
target | ||
neardev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const envConfig = document.getElementById("env-config").textContent; | ||
const config = JSON.parse(envConfig); | ||
|
||
export const flags = { | ||
bosLoaderUrl: | ||
process.env.BOS_LOADER_URL || | ||
config.bosLoaderUrl || | ||
"http://127.0.0.1:4040", | ||
bosLoaderWs: | ||
process.env.BOS_LOADER_WS || config.bosLoaderWs || "ws://127.0.0.1:4040", | ||
enableHotReload: | ||
process.env.ENABLE_HOT_RELOAD ?? config.enableHotReload ?? true, | ||
network: | ||
process.env.NETWORK || config.network || "mainnet", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const path = require("path"); | ||
|
||
const srcPath = path.resolve(__dirname, "../src"); | ||
const distPath = path.resolve(__dirname, "../dist"); | ||
const publicPath = path.resolve(__dirname, "../public"); | ||
const nodeModulesPath = path.resolve(__dirname, "../node_modules"); | ||
|
||
module.exports = { | ||
srcPath, | ||
distPath, | ||
publicPath, | ||
nodeModulesPath, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { merge } = require("webpack-merge"); | ||
|
||
const loadPresets = (env = { presets: [] }) => { | ||
const presets = env.presets || []; | ||
/** @type {string[]} */ | ||
const mergedPresets = [].concat(...[presets]); | ||
const mergedConfigs = mergedPresets.map((presetName) => | ||
require(`./webpack.${presetName}.js`)(env), | ||
); | ||
|
||
return merge({}, ...mergedConfigs); | ||
}; | ||
module.exports = loadPresets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const WebpackBundleAnalyzer = | ||
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; | ||
|
||
module.exports = () => ({ | ||
plugins: [new WebpackBundleAnalyzer()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const path = require("path"); | ||
const { HotModuleReplacementPlugin } = require("webpack"); | ||
|
||
module.exports = () => ({ | ||
devtool: false, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(scss|css)$/, | ||
use: [ | ||
{ | ||
// inject CSS to page | ||
loader: "style-loader", | ||
}, | ||
{ | ||
// translates CSS into CommonJS modules | ||
loader: "css-loader", | ||
}, | ||
{ | ||
// Run postcss actions | ||
loader: "postcss-loader", | ||
options: { | ||
// `postcssOptions` is needed for postcss 8.x; | ||
// if you use postcss 7.x skip the key | ||
postcssOptions: { | ||
// postcss plugins, can be exported to postcss.config.js | ||
plugins: function () { | ||
return [require("autoprefixer")]; | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
// compiles Sass to CSS | ||
loader: "sass-loader", | ||
options: { | ||
// Prefer `dart-sass` | ||
implementation: require("sass"), | ||
sassOptions: { | ||
quietDeps: true, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
devServer: { | ||
open: true, | ||
static: path.resolve(__dirname, "../dist"), | ||
port: 3000, | ||
compress: true, | ||
historyApiFallback: { | ||
disableDotRule: true, | ||
}, | ||
client: { | ||
overlay: false, | ||
}, | ||
}, | ||
plugins: [new HotModuleReplacementPlugin()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | ||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); | ||
const path = require("path"); | ||
|
||
module.exports = () => { | ||
return { | ||
output: { | ||
path: path.resolve(__dirname, "../dist"), | ||
publicPath: "/", | ||
filename: "[name].[contenthash].bundle.js", | ||
}, | ||
devtool: false, | ||
module: { | ||
rules: [ | ||
// { | ||
// test: /\.(css)$/, | ||
// use: [MiniCssExtractPlugin.loader, "css-loader"], | ||
// // options: { | ||
// // sourceMap: false, | ||
// // }, | ||
// }, | ||
{ | ||
test: /\.(scss|css)$/, | ||
use: [ | ||
{ | ||
// inject CSS to page | ||
loader: "style-loader", | ||
}, | ||
{ | ||
// translates CSS into CommonJS modules | ||
loader: "css-loader", | ||
}, | ||
{ | ||
// Run postcss actions | ||
loader: "postcss-loader", | ||
options: { | ||
// `postcssOptions` is needed for postcss 8.x; | ||
// if you use postcss 7.x skip the key | ||
postcssOptions: { | ||
// postcss plugins, can be exported to postcss.config.js | ||
plugins: function () { | ||
return [require("autoprefixer")]; | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
// compiles Sass to CSS | ||
loader: "sass-loader", | ||
options: { | ||
// Prefer `dart-sass` | ||
implementation: require("sass"), | ||
sassOptions: { | ||
quietDeps: true, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: "styles/[name].[contenthash].css", | ||
chunkFilename: "[id].css", | ||
}), | ||
], | ||
optimization: { | ||
minimize: true, | ||
minimizer: [new CssMinimizerPlugin(), "..."], | ||
runtimeChunk: { | ||
name: "runtime", | ||
}, | ||
}, | ||
performance: { | ||
hints: false, | ||
maxEntrypointSize: 512000, | ||
maxAssetSize: 512000, | ||
}, | ||
}; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.