Make "yarn build" work with "yarn install --prod"

This commit is contained in:
Mike Cooper 2019-01-23 13:28:40 -08:00
Родитель 80e3e5f3b2
Коммит af6ff032ac
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9424CEA6F89AB334
3 изменённых файлов: 65 добавлений и 61 удалений

Просмотреть файл

@ -1,5 +1,4 @@
const autoprefixer = require('autoprefixer');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const path = require('path');
@ -46,22 +45,6 @@ module.exports = {
module: {
strictExportPresence: true,
rules: [
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall

Просмотреть файл

@ -8,6 +8,7 @@ const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeM
const baseConfig = require('./webpack.config.base');
const getClientEnvironment = require('./env');
const paths = require('./paths');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
@ -50,6 +51,26 @@ const config = {
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
],
module: {
rules: [
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
],
},
output: {
// Add /* filename */ comments to generated require()s in the output.
pathinfo: true,

Просмотреть файл

@ -7,28 +7,6 @@
"type": "git",
"url": "https://github.com/mozilla/delivery-console"
},
"dependencies": {
"antd": "3.12.4",
"auth0-js": "9.9.1",
"autobind-decorator": "2.4.0",
"chalk": "2.4.2",
"connected-react-router": "5.0.1",
"date-fns": "1.30.1",
"immutable": "3.8.2",
"lodash": "4.17.11",
"raven-js": "3.27.0",
"react": "16.7.0",
"react-copy-to-clipboard": "5.0.1",
"react-dom": "16.7.0",
"react-redux": "5.1.1",
"react-router": "4.3.1",
"react-router-config": "1.0.0-beta.4",
"react-router-dom": "4.3.1",
"redux": "4.0.1",
"redux-immutable": "4.0.0",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
@ -38,21 +16,62 @@
"lint": "therapist use lint:all",
"lint:fix": "therapist use fix:all"
},
"devDependencies": {
"dependencies": {
"@babel/core": "7.2.2",
"@babel/plugin-proposal-decorators": "7.3.0",
"@babel/polyfill": "7.2.5",
"@babel/runtime": "7.3.1",
"antd": "3.12.4",
"auth0-js": "9.9.1",
"autobind-decorator": "2.4.0",
"autoprefixer": "9.4.6",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-loader": "8.0.5",
"babel-plugin-import": "1.11.0",
"babel-preset-react-app": "7.0.0",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.2",
"connected-react-router": "5.0.1",
"css-loader": "2.1.0",
"cssnano": "4.1.8",
"date-fns": "1.30.1",
"extract-css-chunks-webpack-plugin": "3.3.2",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"generate-json-webpack-plugin": "0.3.1",
"html-webpack-plugin": "4.0.0-beta.5",
"immutable": "3.8.2",
"less": "3.9.0",
"less-loader": "4.1.0",
"lodash": "4.17.11",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"promise": "8.0.2",
"raven-js": "3.27.0",
"react": "16.7.0",
"react-copy-to-clipboard": "5.0.1",
"react-dev-utils": "7.0.1",
"react-dom": "16.7.0",
"react-redux": "5.1.1",
"react-router": "4.3.1",
"react-router-config": "1.0.0-beta.4",
"react-router-dom": "4.3.1",
"redux": "4.0.1",
"redux-immutable": "4.0.0",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0",
"style-loader": "0.23.1",
"sw-precache-webpack-plugin": "0.11.5",
"uglifyjs-webpack-plugin": "2.1.1",
"url-loader": "1.1.2",
"webpack": "4.29.0",
"webpack-manifest-plugin": "2.0.4",
"webpack-merge": "4.2.1"
},
"devDependencies": {
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"enzyme": "3.8.0",
@ -66,37 +85,18 @@
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.12.4",
"extract-css-chunks-webpack-plugin": "3.3.2",
"faker": "4.1.0",
"fetch-mock": "7.3.0",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"generate-json-webpack-plugin": "0.3.1",
"html-webpack-plugin": "4.0.0-beta.5",
"jest": "23.6.0",
"jest-immutable-matchers": "2.0.1",
"less": "3.9.0",
"less-loader": "4.1.0",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"prettier": "1.16.1",
"promise": "8.0.2",
"raf": "3.4.1",
"react-dev-utils": "7.0.1",
"react-testing-library": "5.4.4",
"resolve": "1.10.0",
"style-loader": "0.23.1",
"stylelint": "9.10.1",
"stylelint-config-standard": "18.2.0",
"stylelint-order": "2.0.0",
"sw-precache-webpack-plugin": "0.11.5",
"uglifyjs-webpack-plugin": "2.1.1",
"url-loader": "1.1.2",
"webpack": "4.29.0",
"webpack-dev-server": "3.1.14",
"webpack-manifest-plugin": "2.0.4",
"webpack-merge": "4.2.1",
"whatwg-fetch": "3.0.0"
},
"jest": {