mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
Co-Authored-By: Eric Tuvesson <eric.tuvesson@gmail.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: Anders Larsson <64838990+anders-topp@users.noreply.github.com> Co-Authored-By: Johan <4934465+joolsus@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: victoratndl <99176179+victoratndl@users.noreply.github.com>
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
const path = require('path');
|
|
|
|
// NOTE: packagesDir will be resolved to packages by the build system too
|
|
const editorDir = path.join(__dirname, '../../');
|
|
const packagesDir = path.join(__dirname, '../../../');
|
|
|
|
console.log('--- Webpack Configuration');
|
|
console.log('> Editor path: ', editorDir);
|
|
console.log('> Packages path: ', packagesDir);
|
|
console.log('---');
|
|
|
|
const alias = {
|
|
'@scss-placeholders': path.join(editorDir, 'src/editor/src/styles/placeholders'),
|
|
'@scss-mixins': path.join(editorDir, 'src/editor/src/styles/mixins'),
|
|
'@scss-variables': path.join(editorDir, 'src/editor/src/styles/variables'),
|
|
'@noodl-core-ui': path.join(packagesDir, 'noodl-core-ui/src'),
|
|
'@noodl-hooks': path.join(editorDir, 'src/editor/src/hooks'),
|
|
'@noodl-utils': path.join(editorDir, 'src/editor/src/utils'),
|
|
'@noodl-models': path.join(editorDir, 'src/editor/src/models'),
|
|
'@noodl-constants': path.join(editorDir, 'src/editor/src/constants'),
|
|
'@noodl-contexts': path.join(editorDir, 'src/editor/src/contexts'),
|
|
'@noodl-types': path.join(editorDir, 'src/editor/src/types'),
|
|
'@noodl-views': path.join(editorDir, 'src/editor/src/views'),
|
|
'@noodl-store': path.join(editorDir, 'src/editor/src/store')
|
|
};
|
|
|
|
console.log('> alias:');
|
|
console.log(JSON.stringify(alias, null, 2));
|
|
console.log('---');
|
|
|
|
module.exports = {
|
|
output: {
|
|
// https://github.com/webpack/webpack/issues/1114
|
|
libraryTarget: 'commonjs2'
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '.ttf'],
|
|
alias
|
|
}
|
|
};
|