A mo-mo-mo-monster
This commit is contained in:
commit
d6e76e8cfd
56 changed files with 8523 additions and 0 deletions
62
webpack.config.js
Normal file
62
webpack.config.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
const path = require("path");
|
||||
|
||||
const miniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const autoprefixer = require('autoprefixer');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
api: "./assets/js/api.js",
|
||||
scene: "./assets/js/scene.js",
|
||||
editor: "./assets/js/editor.js",
|
||||
frontend: "./assets/js/frontend.js",
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, "static/js"),
|
||||
filename: "[name].bundle.js",
|
||||
},
|
||||
plugins: [new miniCssExtractPlugin()],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: ["@babel/preset-env"],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
{
|
||||
// Adds CSS to the DOM by injecting a `<style>` tag
|
||||
loader: "style-loader",
|
||||
},
|
||||
{
|
||||
// Interprets `@import` and `url()` like `import/require()` and will resolve them
|
||||
loader: "css-loader",
|
||||
},
|
||||
{
|
||||
// Loader for webpack to process CSS with PostCSS
|
||||
loader: "postcss-loader",
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: [autoprefixer],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// Loads a SASS/SCSS file and compiles it to CSS
|
||||
loader: "sass-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue