1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-02 08:48:39 +09:00
YuruToot/config/webpack/loaders/babel.js
2017-10-11 10:43:10 -07:00

15 lines
409 B
JavaScript

const { resolve } = require('path');
const env = process.env.NODE_ENV || 'development';
module.exports = {
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
forceEnv: process.env.NODE_ENV || 'development',
sourceRoot: 'app/javascript',
cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
},
};