This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/frontend/webpack.config.js

63 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

const path = require('path');
module.exports = {
mode: 'development',
entry: {
2018-11-29 13:47:49 +00:00
index: './src/index.coffee',
2018-11-29 11:27:26 +00:00
game: './src/game.coffee'
},
devtool: 'inline-source-map',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'public_html')
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(scss)$/,
use: [{
loader: 'style-loader', // inject CSS to page
}, {
loader: 'css-loader', // translates CSS into CommonJS modules
}, {
loader: 'postcss-loader', // Run post css actions
options: {
plugins: function () { // post css plugins, can be exported to postcss.config.js
return [
require('precss'),
require('autoprefixer')
];
}
}
}, {
loader: 'sass-loader' // compiles Sass to CSS
}]
},
{
test: /\.coffee$/,
use: [
{
loader: 'coffee-loader',
options: {
transpile: {
2018-11-28 16:17:51 +00:00
presets: ['@babel/env']
}
}
}
]
}
]
}
};