parent
8a3cccf25e
commit
f5a4c1c44b
@ -1,61 +0,0 @@ |
|||||||
{ |
|
||||||
"name": "compile-details", |
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json", |
|
||||||
"sourceRoot": "apps/compile-details/src", |
|
||||||
"projectType": "application", |
|
||||||
"implicitDependencies": [ |
|
||||||
], |
|
||||||
"targets": { |
|
||||||
"build": { |
|
||||||
"executor": "@nrwl/webpack:webpack", |
|
||||||
"outputs": ["{options.outputPath}"], |
|
||||||
"defaultConfiguration": "development", |
|
||||||
"options": { |
|
||||||
"compiler": "babel", |
|
||||||
"outputPath": "dist/apps/compile-details", |
|
||||||
"index": "apps/compile-details/src/index.html", |
|
||||||
"baseHref": "./", |
|
||||||
"main": "apps/compile-details/src/main.tsx", |
|
||||||
"tsConfig": "apps/compile-details/tsconfig.app.json", |
|
||||||
"assets": [ |
|
||||||
"apps/compile-details/src/favicon.ico", |
|
||||||
"apps/compile-details/src/profile.json" |
|
||||||
], |
|
||||||
"styles": [], |
|
||||||
"scripts": [], |
|
||||||
"webpackConfig": "apps/compile-details/webpack.config.js" |
|
||||||
}, |
|
||||||
"configurations": { |
|
||||||
"development": { |
|
||||||
}, |
|
||||||
"production": { |
|
||||||
"fileReplacements": [ |
|
||||||
{ |
|
||||||
"replace": "apps/compile-details/src/environments/environment.ts", |
|
||||||
"with": "apps/compile-details/src/environments/environment.prod.ts" |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"serve": { |
|
||||||
"executor": "@nrwl/webpack:dev-server", |
|
||||||
"defaultConfiguration": "development", |
|
||||||
"options": { |
|
||||||
"buildTarget": "compile-details:build", |
|
||||||
"hmr": true, |
|
||||||
"baseHref": "/" |
|
||||||
}, |
|
||||||
"configurations": { |
|
||||||
"development": { |
|
||||||
"buildTarget": "compile-details:build:development", |
|
||||||
"port": 6003 |
|
||||||
}, |
|
||||||
"production": { |
|
||||||
"buildTarget": "compile-details:build:production" |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"tags": [] |
|
||||||
} |
|
@ -1,13 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="en"> |
|
||||||
<head> |
|
||||||
<meta charset="utf-8" /> |
|
||||||
<title>Compilation Details</title> |
|
||||||
<base href="/" /> |
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div id="root"></div> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,23 +0,0 @@ |
|||||||
{ |
|
||||||
"extends": "./tsconfig.json", |
|
||||||
"compilerOptions": { |
|
||||||
"outDir": "../../dist/out-tsc", |
|
||||||
"types": ["node"] |
|
||||||
}, |
|
||||||
"files": [ |
|
||||||
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts", |
|
||||||
"../../node_modules/@nrwl/react/typings/image.d.ts" |
|
||||||
], |
|
||||||
"exclude": [ |
|
||||||
"jest.config.ts", |
|
||||||
"**/*.spec.ts", |
|
||||||
"**/*.test.ts", |
|
||||||
"**/*.spec.tsx", |
|
||||||
"**/*.test.tsx", |
|
||||||
"**/*.spec.js", |
|
||||||
"**/*.test.js", |
|
||||||
"**/*.spec.jsx", |
|
||||||
"**/*.test.jsx" |
|
||||||
], |
|
||||||
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
{ |
|
||||||
"extends": "../../tsconfig.base.json", |
|
||||||
"compilerOptions": { |
|
||||||
"jsx": "react-jsx", |
|
||||||
"allowJs": true, |
|
||||||
"esModuleInterop": true, |
|
||||||
"allowSyntheticDefaultImports": true |
|
||||||
}, |
|
||||||
"files": [], |
|
||||||
"include": [], |
|
||||||
"references": [ |
|
||||||
{ |
|
||||||
"path": "./tsconfig.app.json" |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
@ -1,70 +0,0 @@ |
|||||||
const { composePlugins, withNx } = require('@nrwl/webpack') |
|
||||||
const { withReact } = require('@nrwl/react') |
|
||||||
const webpack = require('webpack') |
|
||||||
const TerserPlugin = require('terser-webpack-plugin') |
|
||||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin') |
|
||||||
|
|
||||||
// Nx plugins for webpack.
|
|
||||||
module.exports = composePlugins(withNx(), withReact(), config => { |
|
||||||
// Update the webpack config as needed here.
|
|
||||||
// e.g. `config.plugins.push(new MyPlugin())`
|
|
||||||
|
|
||||||
// add fallback for node modules
|
|
||||||
config.resolve.fallback = { |
|
||||||
...config.resolve.fallback, |
|
||||||
path: require.resolve('path-browserify'), |
|
||||||
fs: false, |
|
||||||
} |
|
||||||
|
|
||||||
// add externals
|
|
||||||
config.externals = { |
|
||||||
...config.externals, |
|
||||||
solc: 'solc', |
|
||||||
} |
|
||||||
|
|
||||||
config.module.rules.push({ |
|
||||||
test: /\.hbs$/, |
|
||||||
type: 'asset/source', |
|
||||||
}) |
|
||||||
|
|
||||||
// add public path
|
|
||||||
config.output.publicPath = '/' |
|
||||||
|
|
||||||
// add copy & provide plugin
|
|
||||||
config.plugins.push( |
|
||||||
new webpack.ProvidePlugin({ |
|
||||||
Buffer: ['buffer', 'Buffer'], |
|
||||||
url: ['url', 'URL'], |
|
||||||
process: 'process/browser', |
|
||||||
}), |
|
||||||
new webpack.DefinePlugin({}), |
|
||||||
) |
|
||||||
|
|
||||||
// souce-map loader
|
|
||||||
config.module.rules.push({ |
|
||||||
test: /\.js$/, |
|
||||||
use: ['source-map-loader'], |
|
||||||
enforce: 'pre', |
|
||||||
}) |
|
||||||
|
|
||||||
config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings
|
|
||||||
|
|
||||||
// set minimizer
|
|
||||||
config.optimization.minimizer = [ |
|
||||||
new TerserPlugin({ |
|
||||||
parallel: true, |
|
||||||
terserOptions: { |
|
||||||
ecma: 2015, |
|
||||||
compress: false, |
|
||||||
mangle: false, |
|
||||||
format: { |
|
||||||
comments: false, |
|
||||||
}, |
|
||||||
}, |
|
||||||
extractComments: false, |
|
||||||
}), |
|
||||||
new CssMinimizerPlugin(), |
|
||||||
] |
|
||||||
|
|
||||||
return config |
|
||||||
}) |
|
Loading…
Reference in new issue