@@ -11,7 +11,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
1111import LiveReloadPlugin from 'webpack-livereload-plugin' ;
1212import path from 'path' ;
1313import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin' ;
14- import { Configuration } from 'webpack' ;
14+ import { Configuration , DefinePlugin } from 'webpack' ;
1515
1616import { getPackageJson , getPluginJson , hasReadme , getEntries } from './utils' ;
1717import { SOURCE_DIR , DIST_DIR } from './constants' ;
@@ -154,6 +154,10 @@ const config = async (env): Promise<Configuration> => ({
154154 } ,
155155
156156 plugins : [
157+ // Replace current plugin version in migration.ts
158+ new DefinePlugin ( {
159+ PLUGIN_VERSION : JSON . stringify ( getPackageJson ( ) . version ) ,
160+ } ) ,
157161 new CopyWebpackPlugin ( {
158162 patterns : [
159163 // If src/README.md exists use it; otherwise the root README
@@ -163,12 +167,12 @@ const config = async (env): Promise<Configuration> => ({
163167 { from : '../LICENSE' , to : '.' } ,
164168 { from : '../CHANGELOG.md' , to : '.' , force : true } ,
165169 { from : '**/*.json' , to : '.' } , // TODO<Add an error for checking the basic structure of the repo>
166- { from : '**/*.svg' , to : '.' , noErrorOnMissing : true } , // Optional
170+ // { from: '**/*.svg', to: '.', noErrorOnMissing: true }, // Optional
167171 { from : '**/*.png' , to : '.' , noErrorOnMissing : true } , // Optional
168172 { from : '**/*.html' , to : '.' , noErrorOnMissing : true } , // Optional
169173 { from : 'img/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
170174 { from : 'libs/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
171- { from : 'static/**/*' , to : '.' , noErrorOnMissing : true } , // Optional
175+ // { from: 'static/**/*', to: '.', noErrorOnMissing: true }, // Optional
172176 ] ,
173177 } ) ,
174178 // Replace certain template-variables in the README and plugin.json
0 commit comments