sforkowany z mirror/soapbox
Webpack: use one entrypoint
rodzic
e5fd60dbdb
commit
ec474ba4c2
|
@ -2,6 +2,9 @@ import loadPolyfills from './soapbox/load_polyfills';
|
||||||
|
|
||||||
require.context('./images/', true);
|
require.context('./images/', true);
|
||||||
|
|
||||||
|
// Load stylesheet
|
||||||
|
require('./styles/application.scss');
|
||||||
|
|
||||||
loadPolyfills().then(() => {
|
loadPolyfills().then(() => {
|
||||||
require('./soapbox/main').default();
|
require('./soapbox/main').default();
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
|
|
@ -30,10 +30,9 @@ const makeHtmlConfig = (params = {}) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: Object.assign(
|
entry: {
|
||||||
{ application: resolve('app/application.js') },
|
application: resolve('app/application.js'),
|
||||||
{ styles: resolve(join(settings.source_path, 'styles/application.scss')) },
|
},
|
||||||
),
|
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
filename: 'packs/js/[name]-[chunkhash].js',
|
filename: 'packs/js/[name]-[chunkhash].js',
|
||||||
|
|
Ładowanie…
Reference in New Issue