67 lines
1.3 KiB
JavaScript
67 lines
1.3 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
|
|
entry: {
|
|
index: './src/index.js',
|
|
game: './src/game.js'
|
|
},
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'static')
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
loader: "transform-loader?brfs",
|
|
enforce: "post"
|
|
},
|
|
|
|
{
|
|
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: {
|
|
presets: ['@babel/env']
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|
|
]
|
|
}
|
|
};
|