Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "EJS webpack loader (without frontend dependencies)",
"main": "index.js",
"scripts": {
"test": "cd test && ../node_modules/.bin/webpack && node bundle.js"
"test": "npm run test:webpack1 && npm run test:webpack2",
"test:webpack1": "npm install -q [email protected] && webpack --config test/webpack1.config.js && node test/bundle.js",
"test:webpack2": "npm install -q [email protected] && webpack --config test/webpack2.config.js && node test/bundle.js"
},
"repository": {
"type": "git",
Expand All @@ -30,7 +32,6 @@
"uglify-js": "~2.6.1"
},
"devDependencies": {
"node-libs-browser": "^0.5.0",
"webpack": "^1.9.4"
"node-libs-browser": "^0.5.0"
}
}
2 changes: 1 addition & 1 deletion test/webpack.config.js → test/webpack1.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entry: "./app.js",
entry: "./test/app.js",
cache: false,
output: {
path: __dirname,
Expand Down
23 changes: 23 additions & 0 deletions test/webpack2.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./test/app.js",
cache: false,
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
rules: [{
test: /\.(ejs)$/,
use: {
loader: require.resolve('../'),
options: {
htmlmin: true,
htmlminOptions: {
removeComments: true,
}
},
},
}]
}

}