Skip to content

Commit

Permalink
refactor: replaced liquid loader with copy plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Mar 31, 2021
1 parent 8dc64cd commit ee59535
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [2.1.1](https://github.com/hayes0724/shopify-packer/compare/2.1.0...2.1.1) (2021-03-31)


### :hammer: Code Refactoring

* replaced liquid loader with copy plugin ([13160b3](https://github.com/hayes0724/shopify-packer/commit/13160b32d4cab733f5607470e1b2c47daf2583d7))



# [2.1.0](https://github.com/hayes0724/shopify-packer/compare/2.0.13...2.1.0) (2021-03-31)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hayes0724/shopify-packer",
"version": "2.1.0",
"version": "2.1.1",
"bin": {
"packer": "cli/index.js"
},
Expand Down
7 changes: 6 additions & 1 deletion src/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const corsMiddleware = require('cors');
const express = require('express');
const isHotUpdateFile = require('./is-hot-update-file');

class App {
constructor(compiler) {
const app = express();

app.webpackDevMiddleware = webpackDevMiddleware(compiler, {});
app.webpackDevMiddleware = webpackDevMiddleware(compiler, {
writeToDisk: (filePath) => {
return !isHotUpdateFile(filePath);
},
});
app.webpackHotMiddleware = webpackHotMiddleware(compiler, {
log: false,
});
Expand Down
8 changes: 0 additions & 8 deletions src/webpack/parts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ const core = {
},
module: {
rules: [
{
test: /\.(liquid|json)$/,
exclude: [/(css|scss|sass)\.liquid$/, ...config.get('commonExcludes')],
type: 'asset/resource',
generator: {
filename: '[name][ext]',
},
},
{
test: /\.(ts|js)$/,
loader: 'babel-loader',
Expand Down

0 comments on commit ee59535

Please sign in to comment.