Replace to shakapacker from webpacker
This commit is contained in:
parent
0aacf00f5b
commit
64ee565b33
80 changed files with 1737 additions and 3956 deletions
14
config/webpack/webpack.config.js
Normal file
14
config/webpack/webpack.config.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const { existsSync } = require('fs');
|
||||
const { resolve } = require('path');
|
||||
const { env } = require('shakapacker');
|
||||
const baseConfig = require('./environments/base');
|
||||
|
||||
function getWebpackConfig() {
|
||||
const { nodeEnv } = env;
|
||||
const path = resolve(__dirname, 'environments', `${nodeEnv}.js`);
|
||||
const enviromentConfig = existsSync(path) ? require(path) : baseConfig;
|
||||
|
||||
return enviromentConfig;
|
||||
}
|
||||
|
||||
module.exports = getWebpackConfig();
|
Loading…
Add table
Add a link
Reference in a new issue