browserslist

This commit is contained in:
Guy Bedford 2020-03-28 17:37:43 -06:00 committed by Joe Haddad
parent 8af5a83301
commit 90a0cef87e
4 changed files with 11 additions and 3 deletions

View file

@ -1,7 +1,7 @@
import chalk from 'chalk'
import { findConfig } from '../../../../../lib/find-config'
import { resolveRequest } from '../../../../../lib/resolve-request'
import browserslist from 'browserslist'
import browserslist from 'next/dist/compiled/browserslist'
type CssPluginCollection_Array = (string | [string, boolean | object])[]

View file

@ -61,7 +61,6 @@
"@babel/runtime": "7.7.2",
"@next/polyfill-nomodule": "9.3.4-canary.0",
"autodll-webpack-plugin": "0.4.2",
"browserslist": "4.8.3",
"cache-loader": "4.1.0",
"chalk": "2.4.2",
"ci-info": "2.0.0",
@ -191,6 +190,7 @@
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-define": "2.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"browserslist": "4.8.3",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"nanoid": "2.0.3",

View file

@ -249,6 +249,13 @@ export async function ncc_babel_plugin_transform_react_remove_prop_types(
.target('dist/compiled/babel-plugin-transform-react-remove-prop-types')
}
// eslint-disable-next-line camelcase
export async function ncc_browserslist(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('browserslist')))
.ncc({ packageName: 'browserslist' })
.target('dist/compiled/browserslist')
}
// eslint-disable-next-line camelcase
export async function ncc_dotenv(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('dotenv')))
@ -317,6 +324,7 @@ export async function precompile(task) {
'ncc_babel_plugin_syntax_jsx',
'ncc_babel_plugin_transform_define',
'ncc_babel_plugin_transform_react_remove_prop_types',
'ncc_browserslist',
'ncc_dotenv',
'ncc_dotenv_expand',
'ncc_nanoid',

View file

@ -4,7 +4,6 @@ declare module 'webpack/lib/DynamicEntryPlugin'
declare module 'unfetch'
declare module 'launch-editor'
declare module 'styled-jsx/server'
declare module 'browserslist'
declare module 'cssnano-simple' {
import { Plugin } from 'postcss'
@ -55,6 +54,7 @@ declare module 'next/dist/compiled/babel--types' {
import m from '@babel/types'
export = m
}
declare module 'next/dist/compiled/browserslist'
declare module 'next/dist/compiled/dotenv' {
import m from 'dotenv'
export = m