diff --git a/app.config.js b/app.config.js deleted file mode 100644 index 5ad77a11..00000000 --- a/app.config.js +++ /dev/null @@ -1,66 +0,0 @@ -const path = require('path') -const { DefinePlugin } = require('webpack') -const pkg = require(path.resolve(__dirname, './package.json')) - -const SRC_DIR = path.resolve(__dirname, './src') -const configurationFiles = [] - -configurationFiles.push( - require('cozy-scripts/config/webpack.bundle.default.js') -) - -configurationFiles.push( - require('cozy-scripts/config/webpack.config.css-modules') -) - -configurationFiles.push(require('./webpack/appicon.config.js')) - -const extraConfig = { - module: { - rules: [ - { - test: /\.worker(\.entry)\.js$/, - issuer: { not: [/node_modules\//] }, // we want to use this rule only for the apps webworkers, but not for workers created by dependencies - use: [ - { - loader: 'worker-loader', - options: { - name: 'public/[name].[hash].worker.js' - } - } - ] - } - ] - }, - resolve: { - modules: ['node_modules', SRC_DIR], - alias: { - 'react-cozy-helpers': path.resolve(SRC_DIR, './lib/react-cozy-helpers'), - 'cozy-ui/react': 'cozy-ui/transpiled/react', - lib: path.resolve(SRC_DIR, './lib/'), - 'react-pdf$': 'react-pdf/dist/esm/entry.webpack', - 'react-redux': require.resolve('react-redux') - } - }, - plugins: [ - new DefinePlugin({ - __APP_VERSION__: JSON.stringify(pkg.version), - __APP_SLUG__: JSON.stringify(process.env.COZY_APP_SLUG) - }) - ] -} -configurationFiles.push(extraConfig) - -if (configurationFiles[0].multiple && configurationFiles[0].multiple.services) { - // FIXME: Will be handled correctly by next major version of cozy-scripts - configurationFiles[0].multiple.services.__mergeStrategy.strategy[ - 'resolve.modules' - ] = 'replace' - configurationFiles[0].multiple.services.resolve = { - ...configurationFiles[0].multiple.services.resolve, - modules: [SRC_DIR, 'node_modules'] - } - // DO NOT REUSE THIS HACK CODE ABOVE -} - -module.exports = configurationFiles diff --git a/webpack/appicon.config.js b/webpack/appicon.config.js deleted file mode 100644 index 563e28b2..00000000 --- a/webpack/appicon.config.js +++ /dev/null @@ -1,26 +0,0 @@ -const CopyPlugin = require('copy-webpack-plugin') - -module.exports = { - plugins: [ - new CopyPlugin([ - { - from: `src/photos/targets/vendor/assets/app-icon.svg`, - to: 'public/app-icon.svg' - }, - { - from: `src/photos/targets/vendor/assets/favicon*`, - to: 'public/', - flatten: true - }, - { - from: `src/photos/targets/vendor/assets/apple-touch-icon.png`, - to: 'public/apple-touch-icon.png' - }, - { - from: `src/photos/targets/vendor/assets/safari-pinned-tab.svg`, - to: 'public/safari-pinned-tab.svg' - }, - { from: `src/photos/targets/vendor/assets`, ignore: ['.gitkeep'] } - ]) - ] -}