Create libraries directory

This commit is contained in:
Paulo Gustavo Veiga 2021-10-04 17:38:11 -07:00
parent c1fccbc489
commit 181ca7b34e
5 changed files with 44 additions and 41 deletions

View File

@ -4,43 +4,43 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
/** @type {import('webpack').Configuration} */ /** @type {import('webpack').Configuration} */
module.exports = { module.exports = {
entry: { entry: {
layout: path.resolve(__dirname, './test/playground/context-loader'), layout: path.resolve(__dirname, './test/playground/context-loader'),
},
output: {
path: path.resolve(__dirname, 'dist', 'test'),
filename: '[name].test.js',
publicPath: '',
},
mode: 'production',
optimization: {
splitChunks: {
chunks: 'all',
minSize: 2000000,
}, },
output: { },
path: path.resolve(__dirname, 'dist', 'test'), devtool: 'source-map',
filename: '[name].test.js', module: {
publicPath: '', rules: [
}, {
mode: 'production', use: 'babel-loader',
optimization: { test: /.js$/,
splitChunks: { exclude: /node_modules/,
chunks: 'all', },
minSize: 2000000,
},
},
devtool: 'source-map',
module: {
rules: [
{
use: 'babel-loader',
test: /.(js|jsx)$/,
exclude: /node_modules/,
}
],
},
resolve: {
extensions: ['.js','.json'],
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template: 'test/playground/index.html',
}),
new HtmlWebpackPlugin({
chunks: ['layout'],
filename: 'layout',
template: 'test/playground/layout.html',
}),
], ],
},
resolve: {
extensions: ['.js', '.json'],
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template: 'test/playground/index.html',
}),
new HtmlWebpackPlugin({
chunks: ['layout'],
filename: 'layout',
template: 'test/playground/layout.html',
}),
],
}; };

View File

@ -59,10 +59,12 @@
workspacePosition(); workspacePosition();
// Draw a reference grid. // Draw a reference grid.
var container = document.getElementById("sizeExampleContainer");
var grid = new Grid(container, 35, 12); // Enable when JS is loading ...
grid.setPosition("0px", "0px") // var container = document.getElementById("sizeExampleContainer");
grid.render(); // var grid = new Grid(container, 35, 12);
// grid.setPosition("0px", "0px")
// grid.render();
// Define a workspace using pixels and inchs. // Define a workspace using pixels and inchs.
var workspacePixel = new web2d.Workspace(); var workspacePixel = new web2d.Workspace();

View File

@ -23,4 +23,5 @@ module.exports = {
extensions: ['.js', '.json'], extensions: ['.js', '.json'],
}, },
plugins: [new CleanWebpackPlugin()], plugins: [new CleanWebpackPlugin()],
}; };