Skip to content

Commit

Permalink
feat(packages/sui-bundler): try millionjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Alvarez authored and Andrés Alvarez committed Feb 9, 2024
1 parent ee4769a commit a9cf5d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/sui-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"homepage": "https://github.com/SUI-Components/sui/tree/master/packages/sui-bundler#readme",
"dependencies": {
"@babel/core": "7.18.10",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
"@s-ui/helpers": "1",
"@s-ui/sass-loader": "1",
"address": "1.2.2",
Expand All @@ -38,10 +39,12 @@
"find-free-ports": "3.0.0",
"html-webpack-plugin": "5.5.0",
"https-browserify": "1.0.0",
"million": "3.0.3",
"mini-css-extract-plugin": "2.7.7",
"postcss": "8.4.31",
"postcss-loader": "7.3.4",
"process": "0.11.10",
"react-refresh": "0.14.0",
"sass": "1.54.5",
"stream-http": "3.2.0",
"strip-ansi": "6.0.1",
Expand All @@ -50,8 +53,6 @@
"webpack": "5.82.1",
"webpack-dev-server": "4.10.0",
"webpack-manifest-plugin": "5.0.0",
"webpack-node-externals": "3.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
"react-refresh": "0.14.0"
"webpack-node-externals": "3.0.0"
}
}
4 changes: 3 additions & 1 deletion packages/sui-bundler/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable no-console */
const webpack = require('webpack')
const path = require('path')
const million = require('million/compiler')

const HtmlWebpackPlugin = require('html-webpack-plugin')
const {WebpackManifestPlugin} = require('webpack-manifest-plugin')
Expand Down Expand Up @@ -100,7 +101,8 @@ const webpackConfig = {
template: './index.html'
}),
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime/]),
new WebpackManifestPlugin({fileName: 'asset-manifest.json'})
new WebpackManifestPlugin({fileName: 'asset-manifest.json'}),
million.webpack({auto: true})
]),
module: {
rules: cleanList([
Expand Down
3 changes: 2 additions & 1 deletion packages/sui-bundler/webpack.config.server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const webpack = require('webpack')
const webpackNodeExternals = require('webpack-node-externals')
const million = require('million/compiler')
const path = require('path')

const {config, when, cleanList} = require('./shared/index.js')
Expand Down Expand Up @@ -44,7 +45,7 @@ const webpackConfig = {
compression: !isProduction ? 'gzip' : false
},
externals: [webpackNodeExternals()],
plugins: [new webpack.DefinePlugin({'global.GENTLY': false})],
plugins: [new webpack.DefinePlugin({'global.GENTLY': false}), million.webpack({auto: true})],
resolveLoader,
module: {
rules: cleanList([
Expand Down

0 comments on commit a9cf5d8

Please sign in to comment.