Skip to content

Commit 208726f

Browse files
committed
breaking: Extend webpack config from @patternslib/dev.
1 parent b692ce0 commit 208726f

File tree

5 files changed

+17
-271
lines changed

5 files changed

+17
-271
lines changed

webpack/webpack-helpers.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

webpack/webpack-helpers.test.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

webpack/webpack.config.js

Lines changed: 0 additions & 139 deletions
This file was deleted.

webpack/webpack.dist.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Webpack configuration for the Patternslib bundle distribution.
22
process.traceDeprecation = true;
3-
const mf_config = require("./webpack.mf");
3+
const CopyPlugin = require("copy-webpack-plugin");
4+
const mf_config = require("@patternslib/dev/webpack/webpack.mf");
45
const package_json = require("../package.json");
56
const path = require("path");
6-
const patternslib_config = require("./webpack.config");
7+
const patternslib_config = require("@patternslib/dev/webpack/webpack.config");
78

89
module.exports = (env, argv) => {
910
let config = {
@@ -34,6 +35,20 @@ module.exports = (env, argv) => {
3435
})
3536
);
3637

38+
// Polyfills
39+
config.plugins.push(
40+
// Copy polyfills loader to the output path.
41+
new CopyPlugin({
42+
patterns: [
43+
{ from: path.resolve(__dirname, "../src/polyfills-loader.js"), }, // prettier-ignore
44+
],
45+
})
46+
);
47+
48+
if (process.env.NODE_ENV === "development") {
49+
config.devServer.static.directory = path.resolve(__dirname, "../");
50+
}
51+
3752
//console.log(JSON.stringify(config, null, 4));
3853

3954
return config;

webpack/webpack.mf.js

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)