chore: add clipper extension package (#2281)
This commit is contained in:
@@ -8,6 +8,23 @@ require('dotenv').config()
|
||||
|
||||
module.exports = (env) => {
|
||||
mergeWithEnvDefaults(env)
|
||||
|
||||
const copyPluginPatterns = [
|
||||
{ from: 'src/favicon', to: 'favicon' },
|
||||
{ from: 'src/vendor', to: 'dist' },
|
||||
{ from: 'src/404.html' },
|
||||
{ from: 'src/422.html' },
|
||||
{ from: 'src/500.html' },
|
||||
{ from: 'src/index.html' },
|
||||
{ from: 'src/manifest.webmanifest' },
|
||||
{ from: 'src/robots.txt' },
|
||||
{ from: 'src/.well-known', to: '.well-known' },
|
||||
]
|
||||
|
||||
if (process.env.BUILD_TARGET !== 'clipper') {
|
||||
copyPluginPatterns.push({ from: 'src/components', to: 'components' })
|
||||
}
|
||||
|
||||
return {
|
||||
entry: './src/javascripts/index.ts',
|
||||
output: {
|
||||
@@ -36,18 +53,7 @@ module.exports = (env) => {
|
||||
ignoreOrder: true, // Enable to remove warnings about conflicting order
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{ from: 'src/favicon', to: 'favicon' },
|
||||
{ from: 'src/vendor', to: 'dist' },
|
||||
{ from: 'src/components', to: 'components' },
|
||||
{ from: 'src/404.html' },
|
||||
{ from: 'src/422.html' },
|
||||
{ from: 'src/500.html' },
|
||||
{ from: 'src/index.html' },
|
||||
{ from: 'src/manifest.webmanifest' },
|
||||
{ from: 'src/robots.txt' },
|
||||
{ from: 'src/.well-known', to: '.well-known' },
|
||||
],
|
||||
patterns: copyPluginPatterns,
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user