Skip to content

Commit

Permalink
ignore-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored and Timer committed Mar 30, 2020
1 parent 8dad5ab commit a3ec26d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/build/webpack/config/blocks/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const css = curry(async function css(
regexCssGlobal,
(scssEnabled && regexSassGlobal) as RegExp,
].filter(Boolean),
use: require.resolve('ignore-loader'),
use: require.resolve('next/dist/compiled/ignore-loader'),
},
],
})
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"css-loader": "3.3.0",
"cssnano-simple": "1.0.0",
"fork-ts-checker-webpack-plugin": "3.1.1",
"ignore-loader": "0.1.2",
"jest-worker": "24.9.0",
"loader-utils": "2.0.0",
"mini-css-extract-plugin": "0.8.0",
Expand Down Expand Up @@ -172,6 +171,7 @@
"fresh": "0.5.2",
"gzip-size": "5.1.1",
"http-proxy": "1.18.0",
"ignore-loader": "0.1.2",
"is-docker": "2.0.0",
"is-wsl": "2.1.1",
"json5": "2.1.2",
Expand Down
9 changes: 9 additions & 0 deletions packages/next/taskfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ export async function ncc_http_proxy(task, opts) {
.target('dist/compiled/http-proxy')
}
// eslint-disable-next-line camelcase
externals['ignore-loader'] = 'next/dist/compiled/ignore-loader'
export async function ncc_ignore_loader(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('ignore-loader')))
.ncc({ packageName: 'ignore-loader', externals })
.target('dist/compiled/ignore-loader')
}
// eslint-disable-next-line camelcase
externals['is-docker'] = 'next/dist/compiled/is-docker'
export async function ncc_is_docker(task, opts) {
await task
Expand Down Expand Up @@ -488,6 +496,7 @@ export async function precompile(task) {
'ncc_fresh',
'ncc_gzip_size',
'ncc_http_proxy',
'ncc_ignore_loader',
'ncc_is_docker',
'ncc_is_wsl',
'ncc_json5',
Expand Down

0 comments on commit a3ec26d

Please sign in to comment.