Comments (2)
Для этого необходимо настроить вебпак с поддержкой многостраничных приложений https://webpack.js.org/concepts/entry-points/#multi-page-application
from gulp-boilerplate.
Вот пока с конфигами беда :( от слова совсем
Возможно Вы сможете подсказать как именно правильно нужно вывать эти самые entry
ниже файл конфига скриптов (если нужно могу всю сборку предоставить)
`const gulp = require('gulp');
const babel = require('gulp-babel');
const mode = require('gulp-mode')();
const fileinclude = require('gulp-file-include');
const paths = require('../paths');
const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const uglify = require('gulp-uglify-es').default;
const scripts = () => {
return gulp
.src(paths.src.js)
.pipe(fileinclude())
.pipe(
webpackStream({
mode: 'development',
output: {
filename: 'scripts.js',
},
module: {
rules: [
{
test: /.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
{
test: /.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /.(gif|png|jpe?g|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
name: '[path][name].[ext]',
limit: 8192,
esModule: false,
},
},
'img-loader',
],
},
{
test: /.hbs$/,
use: 'handlebars-loader',
},
{
test: /.woff(2)?(?[a-z0-9#=&.]+)?$/,
use: [
{
loader: 'url-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
limit: 10000,
mimetype: 'application/font-woff',
},
},
],
},
{
test: /.(ttf|eot)(?v=\d+.\d+.\d+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
},
},
],
},
],
},
}),
)
.pipe(babel())
.pipe(mode.production(uglify()))
.pipe(gulp.dest(paths.build.js));
};
module.exports = scripts;`
from gulp-boilerplate.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-boilerplate.