vadimmarkov / webpack-es6-sass-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA minimalistic webpack 4 based boilerplate for building web apps
A minimalistic webpack 4 based boilerplate for building web apps
Hi vadimmarkov,
Your tool is good but I don't understand how to add multiples pages html. I have index-en.html / index-fr.html / index-it.html / index-es.html and those pages aren't builded.
So I tried to do this, in webpack.production.js :
const production = {
plugins: [
new HtmlWebpackPlugin({
template: 'index-en.html',
filename: './index-en.html',
chunks: ['index-en'],
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
}
}),
new HtmlWebpackPlugin({
template: 'index-fr.html',
filename: './index-fr.html',
chunks: ['index-fr'],
}),
new HtmlWebpackPlugin({
template: 'index-es.html',
filename: './index-es.html',
chunks: ['index-es'],
}),
new HtmlWebpackPlugin({
template: 'index-it.html',
filename: './index-it.html',
chunks: ['index-it'],
}),
new StatsWriterPlugin({ fields: null, filename: '../stats.json' }),
new WebpackAssetsManifest(),
new CssoWebpackPlugin(),
],
devtool: 'source-map',
};
It works, I get my pages builded but my css/js is broken when I do this. Any idea ?
Thank in advance
Thank you for this repo. Works perfectly except with images. The "images/logo.png" in the demo html file is not working and i cannot seem to make images work when i change the layout to my own.
Hello Vadim
First of all thanks, for the awesome boilerplate. I am using it almost in all my projects. But i've been facing one small issue when i add image to scss like [background-image] and to html, both images showed correctly in dev mode after changing public path.
however after build css and html were located in different location, html had wrong url, i could change URL manually but I am trying to configure it from webpack
` use: {
loader: 'file-loader',
options: {
publicPath: '../images',
outputPath: 'images',
name: '[name].[hash:8].[ext]',
},
},
`
I tried to use file loader but still no luck. In order to reproduce this issue, please add background image to scss as well as to html. I would appreciate your solution. Thank you in advance :)
Hi, thanks for this project.
I've just run npm run start and got this error:
app.2a8753c3.css:1
GET http://localhost:8080/stylesheets/fonts/Roboto-Light.0ee1beee.woff net::ERR_ABORTED 404 (Not Found)
In order to build the correct fonts path, I modified webpack/webpack.common.js line 58, from:
publicPath: 'fonts',
outputPath: 'fonts',
to:
publicPath: '../fonts',
outputPath: 'fonts',
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.