Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: import and build auspice as a part of webpack build
- Loading branch information
1 parent
50e1761
commit 9d75bae
Showing
9 changed files
with
393 additions
and
17,583 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
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 @@ | ||
import webpack from 'webpack' | ||
import type { NextConfig } from 'next' | ||
|
||
import { addWebpackPlugin } from './lib/addWebpackPlugin' | ||
|
||
export default function withoutNpmCss(nextConfig: NextConfig) { | ||
let nextConfigNew = nextConfig | ||
nextConfigNew = addWebpackPlugin( | ||
nextConfigNew, | ||
|
||
new webpack.ContextReplacementPlugin(/.*/, (context) => { | ||
console.log({ context }) | ||
}), | ||
) | ||
|
||
nextConfigNew = addWebpackPlugin( | ||
nextConfigNew, | ||
new webpack.IgnorePlugin({ | ||
checkResource: (resource: string) => { | ||
return ( | ||
resource.endsWith('awesomplete.css') || | ||
resource.includes('core-js/library') || | ||
resource.includes('babel-runtime') | ||
) | ||
}, | ||
}), | ||
) | ||
|
||
return nextConfigNew | ||
} |
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
Oops, something went wrong.