-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
The default bannerConfig should be left out in:
wp-webpack-script/packages/scripts/src/config/project.config.default.ts
Lines 115 to 130 in 77d9189
| export const projectConfigDefault: ProjectConfig = { | |
| // Project Identity | |
| appName: 'wpackio', // Unique name of your project | |
| type: 'plugin', // Plugin or theme | |
| slug: 'wpack-io', // Plugin or Theme slug, basically the directory name under `wp-content/<themes|plugins>` | |
| // Used to generate banners on top of compiled stuff | |
| bannerConfig: { | |
| name: 'WordPress WebPack Bundler', | |
| author: 'Swashata Ghosh', | |
| license: 'GPL-3.0', | |
| link: 'https://wpack.io', | |
| version: '1.0.0', | |
| copyrightText: | |
| 'This software is released under the GPL-3.0 License\nhttps://opensource.org/licenses/GPL-3.0', | |
| credit: true, | |
| }, |
Inlining css chunks is not pretty with a bannerConfig for each file. There is no need for a default config. Even bannerConfig: false does just return undefined for every property in:
wp-webpack-script/packages/scripts/src/config/WebpackConfigHelper.ts
Lines 380 to 402 in 8d6be75
| new webpack.BannerPlugin({ | |
| entryOnly: false, | |
| raw: false, | |
| // Add to ts, tsx, css, scss, sass | |
| include: /\.((t|j)sx?|s?(c|a)ss)$/, | |
| banner: ` | |
| ${bannerConfig.name} | |
| @author ${bannerConfig.author} | |
| @version ${bannerConfig.version} | |
| @link ${bannerConfig.link} | |
| @license ${bannerConfig.license} | |
| Copyright (c) ${new Date().getFullYear()} ${bannerConfig.author} | |
| ${bannerConfig.copyrightText}${bannerConfig.credit ? creditNote : ''}`, | |
| }) | |
| ); | |
| } | |
| // Return it | |
| return plugins; | |
| } |
Metadata
Metadata
Assignees
Labels
No labels