File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 1- import { RawSource } from "webpack-sources" ;
2-
31export default class CopyPluginWithAssetInfo {
42 apply ( compiler ) {
53 const plugin = { name : this . constructor . name } ;
4+ const { RawSource } = compiler . webpack . sources ;
65
76 compiler . hooks . thisCompilation . tap ( plugin , ( compilation ) => {
87 compilation . hooks . additionalAssets . tap ( plugin , ( ) => {
Original file line number Diff line number Diff line change 1- import webpack from "webpack" ;
2-
3- // webpack 5 exposes the sources property to ensure the right version of webpack-sources is used
4- const { ConcatSource } =
5- // eslint-disable-next-line global-require
6- webpack . sources || require ( "webpack-sources" ) ;
7-
81export default class ExistingCommentsFile {
92 constructor ( options = { } ) {
103 this . options = options ;
114 }
125
136 apply ( compiler ) {
147 const plugin = { name : this . constructor . name } ;
8+ const { ConcatSource } = compiler . webpack . sources ;
159
1610 compiler . hooks . thisCompilation . tap ( plugin , ( compilation ) => {
1711 compilation . hooks . additionalAssets . tap ( plugin , ( ) => {
You can’t perform that action at this time.
0 commit comments