Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
upgrade json-loader example
Browse files Browse the repository at this point in the history
  • Loading branch information
amireh committed Mar 4, 2018
1 parent 24f47cc commit 41391be
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 54 deletions.
3 changes: 3 additions & 0 deletions examples/json-loader/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
diff ./happy/main.js ./vanilla/main.js

node ./happy/main.js | grep "Hello World!"
31 changes: 31 additions & 0 deletions examples/json-loader/versions/1/happy/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const path = require('path');
const e = require('@happypack/example-utils');
const { HappyPack } = e;

module.exports = {
context: path.resolve(__dirname),
entry: e.resolve(module, 'lib/index.js'),

output: {
path: e.outputDir(module),
filename: '[name].js'
},

plugins: [
new HappyPack({
threads: 2,
loaders: [
'json'
]
}),
],

module: {
loaders: [
{
test: /\.json$/,
loader: e.happyLoader,
},
],
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "happypack-examples__json-loader",
"name": "@happypack-examples/json-loader--webpack-1",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
21 changes: 21 additions & 0 deletions examples/json-loader/versions/1/vanilla/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');
const e = require('@happypack/example-utils');

module.exports = {
context: path.resolve(__dirname),
entry: e.resolve(module, 'lib/index.js'),

output: {
path: e.outputDir(module),
filename: '[name].js'
},

module: {
loaders: [
{
test: /\.json$/,
loader: 'json',
},
],
}
}
21 changes: 0 additions & 21 deletions examples/json-loader/webpack.config--raw.js

This file was deleted.

32 changes: 0 additions & 32 deletions examples/json-loader/webpack.config.js

This file was deleted.

0 comments on commit 41391be

Please sign in to comment.